pre release commit (1.9.0.325)

This commit is contained in:
RainLoop Team 2015-05-09 16:09:08 +04:00
parent 1fb553e77e
commit 5b6c90aea9
7 changed files with 80 additions and 28 deletions

View file

@ -4,7 +4,7 @@
<name>RainLoop</name> <name>RainLoop</name>
<description>Simple, modern and fast web-based email client.</description> <description>Simple, modern and fast web-based email client.</description>
<version>0.0</version> <version>0.0</version>
<licence>AGPL 3.0</licence> <licence></licence>
<author>RainLoop Team</author> <author>RainLoop Team</author>
<require>6.0</require> <require>6.0</require>
<dependencies> <dependencies>

View file

@ -114,6 +114,21 @@
'User': 99 'User': 99
}; };
/**
* @enum {number}
*/
Enums.ServerFolderType = {
'USER': 0,
'INBOX': 1,
'SENT': 2,
'DRAFTS': 3,
'JUNK': 4,
'TRASH': 5,
'IMPORTANT': 10,
'FLAGGED': 11,
'ALL': 12
};
/** /**
* @enum {string} * @enum {string}
*/ */

View file

@ -162,12 +162,11 @@
Settings.settingsGet('ArchiveFolder') + Settings.settingsGet('ArchiveFolder') +
Settings.settingsGet('NullFolder')) Settings.settingsGet('NullFolder'))
{ {
// TODO Magic Numbers Settings.settingsSet('SentFolder', oData['SystemFolders'][Enums.ServerFolderType.SENT] || null);
Settings.settingsSet('SentFolder', oData['SystemFolders'][2] || null); Settings.settingsSet('DraftFolder', oData['SystemFolders'][Enums.ServerFolderType.DRAFTS] || null);
Settings.settingsSet('DraftFolder', oData['SystemFolders'][3] || null); Settings.settingsSet('SpamFolder', oData['SystemFolders'][Enums.ServerFolderType.JUNK] || null);
Settings.settingsSet('SpamFolder', oData['SystemFolders'][4] || null); Settings.settingsSet('TrashFolder', oData['SystemFolders'][Enums.ServerFolderType.TRASH] || null);
Settings.settingsSet('TrashFolder', oData['SystemFolders'][5] || null); Settings.settingsSet('ArchiveFolder', oData['SystemFolders'][Enums.ServerFolderType.ALL] || null);
Settings.settingsSet('ArchiveFolder', oData['SystemFolders'][12] || null);
bUpdate = true; bUpdate = true;
} }

View file

@ -563,7 +563,10 @@ gulp.task('rainloop:owncloud:setup', ['rainloop:owncloud:copy',
; ;
fs.writeFileSync(dist + 'rainloop/appinfo/info.xml', fs.writeFileSync(dist + 'rainloop/appinfo/info.xml',
fs.readFileSync(dist + 'rainloop/appinfo/info.xml', 'utf8').replace('<version>0.0</version>', '<version>' + versionFull + '</version>')); fs.readFileSync(dist + 'rainloop/appinfo/info.xml', 'utf8')
.replace('<version>0.0</version>', '<version>' + versionFull + '</version>')
.replace('<licence></licence>', '<licence>' + (cfg.community ? 'AGPLv3' : 'CC BY-NC-SA 3.0') + '</licence>')
);
fs.writeFileSync(dist + 'rainloop/appinfo/version', versionFull); fs.writeFileSync(dist + 'rainloop/appinfo/version', versionFull);
fs.writeFileSync(dist + 'rainloop/VERSION', versionFull); fs.writeFileSync(dist + 'rainloop/VERSION', versionFull);
@ -571,7 +574,7 @@ gulp.task('rainloop:owncloud:setup', ['rainloop:owncloud:copy',
cfg.destPath = cfg.releasesPath + '/owncloud/' + versionFull + '/'; cfg.destPath = cfg.releasesPath + '/owncloud/' + versionFull + '/';
cfg.cleanPath = dist; cfg.cleanPath = dist;
cfg.zipSrcPath = dist; cfg.zipSrcPath = dist;
cfg.zipFile = 'rainloop-owncloud-app-' + (cfg.community ? '' : 'premium-') + versionFull + '.zip'; cfg.zipFile = 'rainloop-owncloud-app-' + (cfg.community ? '' : 'cc-') + versionFull + '.zip';
cfg.md5File = cfg.zipFile; cfg.md5File = cfg.zipFile;
}); });

View file

@ -2,7 +2,7 @@
"name": "RainLoop", "name": "RainLoop",
"title": "RainLoop Webmail", "title": "RainLoop Webmail",
"version": "1.9.0", "version": "1.9.0",
"release": "324", "release": "325",
"description": "Simple, modern & fast web-based email client", "description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net", "homepage": "http://rainloop.net",
"main": "gulpfile.js", "main": "gulpfile.js",

View file

@ -5103,7 +5103,6 @@ class Actions
$oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount); $oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
$aSystemFolders = array(); $aSystemFolders = array();
$this->recFoldersTypes($oAccount, $oFolderCollection, $aSystemFolders); $this->recFoldersTypes($oAccount, $oFolderCollection, $aSystemFolders);
$oFolderCollection->SystemFolders = $aSystemFolders; $oFolderCollection->SystemFolders = $aSystemFolders;
@ -9495,7 +9494,8 @@ class Actions
'FoldersHash' => isset($mResponse->FoldersHash) ? $mResponse->FoldersHash : '', 'FoldersHash' => isset($mResponse->FoldersHash) ? $mResponse->FoldersHash : '',
'IsThreadsSupported' => $mResponse->IsThreadsSupported, 'IsThreadsSupported' => $mResponse->IsThreadsSupported,
'Optimized' => $mResponse->Optimized, 'Optimized' => $mResponse->Optimized,
'SystemFolders' => isset($mResponse->SystemFolders) && \is_array($mResponse->SystemFolders) ? $mResponse->SystemFolders : array() 'SystemFolders' => isset($mResponse->SystemFolders) && \is_array($mResponse->SystemFolders) ?
$mResponse->SystemFolders : array()
)); ));
} }
else if ($mResponse instanceof \MailSo\Base\Collection) else if ($mResponse instanceof \MailSo\Base\Collection)

View file

@ -188,10 +188,10 @@ class PdoAddressBook
$this->oLogger->Write($sCmd.' '.$sUrl.(('PUT' === $sCmd || 'POST' === $sCmd) && null !== $mData ? ' ('.\strlen($mData).')' : ''), $this->oLogger->Write($sCmd.' '.$sUrl.(('PUT' === $sCmd || 'POST' === $sCmd) && null !== $mData ? ' ('.\strlen($mData).')' : ''),
\MailSo\Log\Enumerations\Type::INFO, 'DAV'); \MailSo\Log\Enumerations\Type::INFO, 'DAV');
if ('PUT' === $sCmd || 'POST' === $sCmd) // if ('PUT' === $sCmd || 'POST' === $sCmd)
{ // {
$this->oLogger->Write($mData, \MailSo\Log\Enumerations\Type::INFO, 'DAV'); // $this->oLogger->Write($mData, \MailSo\Log\Enumerations\Type::INFO, 'DAV');
} // }
$oResponse = false; $oResponse = false;
try try
@ -265,7 +265,7 @@ class PdoAddressBook
$sCurrentUserPrincipal = ''; $sCurrentUserPrincipal = '';
$sAddressbookHomeSet = ''; $sAddressbookHomeSet = '';
// [{DAV:}current-user-principal] => /cloud/remote.php/carddav/principals/admin/ // [{DAV:}current-user-principal] => /cloud/remote.php/carddav/principals/admin/
// [{urn:ietf:params:xml:ns:carddav}addressbook-home-set] => /cloud/remote.php/carddav/addressbooks/admin/ // [{urn:ietf:params:xml:ns:carddav}addressbook-home-set] => /cloud/remote.php/carddav/addressbooks/admin/
@ -297,14 +297,20 @@ class PdoAddressBook
if (!empty($sKey)) if (!empty($sKey))
{ {
$sFirstNextPath = $sKey; if (empty($sFirstNextPath))
$oResourceType = isset($aItem['{DAV:}resourcetype']) ? $aItem['{DAV:}resourcetype'] : null;
/* @var $oResourceType \SabreForRainLoop\DAV\Property\ResourceType */
if ($oResourceType && $oResourceType->is('{DAV:}collection'))
{ {
$sNextPath = $sKey; $sFirstNextPath = $sKey;
continue; }
if (empty($sNextPath))
{
$oResourceType = isset($aItem['{DAV:}resourcetype']) ? $aItem['{DAV:}resourcetype'] : null;
/* @var $oResourceType \SabreForRainLoop\DAV\Property\ResourceType */
if ($oResourceType && $oResourceType->is('{DAV:}collection'))
{
$sNextPath = $sKey;
continue;
}
} }
} }
} }
@ -562,6 +568,17 @@ class PdoAddressBook
return false; return false;
} }
$aMatch = array();
$sUserAddressBookNameName = '';
if (\preg_match('/\|(.+)$/', $sUrl, $aMatch) && !empty($aMatch[1]))
{
$sUserAddressBookNameName = \trim($aMatch[1]);
$sUserAddressBookNameName = \MailSo\Base\Utils::StrToLowerIfAscii($sUserAddressBookNameName);
$sUrl = \preg_replace('/\|(.+)$/', '', $sUrl);
}
$oClient = $this->getDavClientFromUrl($sUrl, $sUser, $sPassword, $sProxy); $oClient = $this->getDavClientFromUrl($sUrl, $sUser, $sPassword, $sProxy);
if (!$oClient) if (!$oClient)
{ {
@ -583,12 +600,30 @@ class PdoAddressBook
{ {
if (1 < \count($aPaths)) if (1 < \count($aPaths))
{ {
foreach ($aPaths as $sKey => $sValue) if ('' !== $sUserAddressBookNameName)
{ {
if (\in_array(\strtolower($sValue), array('contacts', 'default', 'addressbook', 'address book'))) foreach ($aPaths as $sKey => $sValue)
{ {
$sNewPath = $sKey; $sValue = \MailSo\Base\Utils::StrToLowerIfAscii(\trim($sValue));
break; if ($sValue === $sUserAddressBookNameName)
{
$sNewPath = $sKey;
break;
}
}
}
if (empty($sNewPath))
{
foreach ($aPaths as $sKey => $sValue)
{
$sValue = \MailSo\Base\Utils::StrToLowerIfAscii($sValue);
if (\in_array($sValue, array('contacts', 'default', 'addressbook', 'address book')))
{
$sNewPath = $sKey;
break;
}
} }
} }
} }