Merge master into new-contacts-api

This commit is contained in:
RainLoop Team 2013-11-28 01:10:36 +04:00
commit 103c6efb85
6 changed files with 234 additions and 211 deletions

View file

@ -80,7 +80,7 @@
overflow: auto; overflow: auto;
overflow-y: scroll; overflow-y: scroll;
font-family: arial, sans-serif; font-family: arial, sans-serif;
font-size: 13px; font-size: 14px;
line-height: 16px; line-height: 16px;
margin: 0px; margin: 0px;
padding: 8px; padding: 8px;
@ -125,6 +125,8 @@
line-height: 16px; line-height: 16px;
margin: 0px; margin: 0px;
padding: 8px; padding: 8px;
font-family: arial, sans-serif;
font-size: 14px;
overflow: auto; overflow: auto;
overflow-y: scroll; overflow-y: scroll;

View file

@ -2,7 +2,7 @@
"name": "RainLoop", "name": "RainLoop",
"title": "RainLoop Webmail", "title": "RainLoop Webmail",
"version": "1.4.2", "version": "1.4.2",
"release": "524", "release": "525",
"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": "Gruntfile.js", "main": "Gruntfile.js",

View file

@ -2224,26 +2224,35 @@ class Actions
return '' === $sCoreAccess || APP_SITE === $sCoreAccess; return '' === $sCoreAccess || APP_SITE === $sCoreAccess;
} }
private function getRepositoryDataByUrl($sRepo, &$bReal = false) /**
* @param string $sRepo
* @param bool $bReal = false
* @param bool $bMain = true
* @return array
*/
private function getRepositoryDataByUrl($sRepo, &$bReal = false, $bMain = true)
{ {
$bReal = false; $bReal = false;
$aRep = null; $aRep = null;
$sRep = ''; $sRep = '';
$sRepoType = \strtolower(\trim($this->Config()->Get('labs', 'repo_type', 'stable')));
$sRepoFile = 'repository.json'; $sRepoFile = 'repository.json';
$iRepTime = 0; $iRepTime = 0;
switch ($sRepoType) { if ($bMain)
case 'dev': {
case 'nightly': switch (\strtolower(\trim($this->Config()->Get('labs', 'repo_type', 'stable'))))
case 'beta': {
$sRepoFile = 'beta.repository.json'; case 'dev':
break; case 'nightly':
case 'stable': case 'beta':
default: $sRepoFile = 'beta.repository.json';
$sRepoFile = 'repository.json'; break;
break; case 'stable':
default:
$sRepoFile = 'repository.json';
break;
}
} }
$oHttp = \MailSo\Base\Http::SingletonInstance(); $oHttp = \MailSo\Base\Http::SingletonInstance();
@ -2352,8 +2361,9 @@ class Actions
$sAddRepo = $this->rainloopRepo(true); $sAddRepo = $this->rainloopRepo(true);
if (0 < \strlen($sAddRepo)) if (0 < \strlen($sAddRepo))
{ {
$aAddData = $this->getRepositoryDataByUrl($sAddRepo); $bFakeReal = false;
if (\is_array($aAddData) && 0 < \count($aAddData)) $aAddData = $this->getRepositoryDataByUrl($sAddRepo, $bFakeReal, false);
if ($bFakeReal && \is_array($aAddData) && 0 < \count($aAddData))
{ {
$aResult = \array_merge($aResult, $aAddData); $aResult = \array_merge($aResult, $aAddData);
} }
@ -2553,7 +2563,7 @@ class Actions
$this->Logger()->Write($sUrl.' -> '.$sTmp, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER'); $this->Logger()->Write($sUrl.' -> '.$sTmp, \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
} }
@fclose($pDest); @\fclose($pDest);
} }
else else
{ {
@ -2572,8 +2582,8 @@ class Actions
$sTmpFolder = APP_PRIVATE_DATA.\md5($sTmp); $sTmpFolder = APP_PRIVATE_DATA.\md5($sTmp);
mkdir($sTmpFolder); \mkdir($sTmpFolder);
if (is_dir($sTmpFolder)) if (\is_dir($sTmpFolder))
{ {
$bResult = 0 !== $oArchive->extract(PCLZIP_OPT_PATH, $sTmpFolder); $bResult = 0 !== $oArchive->extract(PCLZIP_OPT_PATH, $sTmpFolder);
if (!$bResult) if (!$bResult)
@ -2581,27 +2591,35 @@ class Actions
$this->Logger()->Write('Cannot extract package files: '.$oArchive->errorInfo(), \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER'); $this->Logger()->Write('Cannot extract package files: '.$oArchive->errorInfo(), \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
} }
if ($bResult && file_exists($sTmpFolder.'/index.php') && if ($bResult && \file_exists($sTmpFolder.'/index.php') &&
is_writable(APP_INDEX_ROOT_PATH.'rainloop/') && \is_writable(APP_INDEX_ROOT_PATH.'rainloop/') &&
file_exists($sTmpFolder.'/data/VERSION') && \file_exists($sTmpFolder.'/data/VERSION') &&
is_dir($sTmpFolder.'/rainloop/')) \is_dir($sTmpFolder.'/rainloop/'))
{ {
$sNewVersion = file_get_contents($sTmpFolder.'/data/VERSION'); $sNewVersion = \file_get_contents($sTmpFolder.'/data/VERSION');
if ($sNewVersion && !is_dir(APP_INDEX_ROOT_PATH.'rainloop/v/'.$sNewVersion)) if ($sNewVersion && !\is_dir(APP_INDEX_ROOT_PATH.'rainloop/v/'.$sNewVersion))
{ {
\MailSo\Base\Utils::CopyDir($sTmpFolder.'/rainloop/', APP_INDEX_ROOT_PATH.'rainloop/'); \MailSo\Base\Utils::CopyDir($sTmpFolder.'/rainloop/', APP_INDEX_ROOT_PATH.'rainloop/');
copy($sTmpFolder.'/data/VERSION', APP_DATA_FOLDER_PATH.'VERSION'); if (!\is_dir(APP_INDEX_ROOT_PATH.'rainloop/v/'.$sNewVersion) &&
if (md5_file($sTmpFolder.'/index.php') !== md5_file(APP_INDEX_ROOT_PATH.'index.php')) \copy($sTmpFolder.'/data/VERSION', APP_DATA_FOLDER_PATH.'VERSION'))
{ {
copy($sTmpFolder.'/index.php', APP_INDEX_ROOT_PATH.'index.php'); if (\md5_file($sTmpFolder.'/index.php') !== \md5_file(APP_INDEX_ROOT_PATH.'index.php'))
} {
\copy($sTmpFolder.'/index.php', APP_INDEX_ROOT_PATH.'index.php');
}
$bResult = true; $bResult = true;
}
else
{
$this->Logger()->Write('Cannot copy new package files', \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
$this->Logger()->Write($sTmpFolder.'/rainloop/ -> '.APP_INDEX_ROOT_PATH.'rainloop/', \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
}
} }
else else
{ {
$this->Logger()->WriteDump($sNewVersion.' version already installed', \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER'); $this->Logger()->Write($sNewVersion.' version already installed', \MailSo\Log\Enumerations\Type::ERROR, 'INSTALLER');
} }
} }
else if ($bResult) else if ($bResult)
@ -2619,7 +2637,7 @@ class Actions
else else
{ {
$bResult = true; $bResult = true;
if (is_dir(APP_PLUGINS_PATH.$sId)) if (\is_dir(APP_PLUGINS_PATH.$sId))
{ {
$bResult = \MailSo\Base\Utils::RecRmDir(APP_PLUGINS_PATH.$sId); $bResult = \MailSo\Base\Utils::RecRmDir(APP_PLUGINS_PATH.$sId);
if (!$bResult) if (!$bResult)
@ -2638,12 +2656,11 @@ class Actions
} }
} }
@unlink($sTmp); @\unlink($sTmp);
} }
return $this->DefaultResponse(__FUNCTION__, $bResult ? ( return $this->DefaultResponse(__FUNCTION__, $bResult ?
'plugin' !== $sType ? array('Reload' => true) : true ('plugin' !== $sType ? array('Reload' => true) : true) : false);
) : false);
} }
/** /**

View file

@ -8326,7 +8326,7 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
overflow: auto; overflow: auto;
overflow-y: scroll; overflow-y: scroll;
font-family: arial, sans-serif; font-family: arial, sans-serif;
font-size: 13px; font-size: 14px;
line-height: 16px; line-height: 16px;
margin: 0px; margin: 0px;
padding: 8px; padding: 8px;
@ -8364,6 +8364,8 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
line-height: 16px; line-height: 16px;
margin: 0px; margin: 0px;
padding: 8px; padding: 8px;
font-family: arial, sans-serif;
font-size: 14px;
overflow: auto; overflow: auto;
overflow-y: scroll; overflow-y: scroll;
} }

File diff suppressed because one or more lines are too long

View file

@ -6173,7 +6173,7 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
overflow: auto; overflow: auto;
overflow-y: scroll; overflow-y: scroll;
font-family: arial, sans-serif; font-family: arial, sans-serif;
font-size: 13px; font-size: 14px;
line-height: 16px; line-height: 16px;
margin: 0px; margin: 0px;
padding: 8px; padding: 8px;
@ -6211,6 +6211,8 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
line-height: 16px; line-height: 16px;
margin: 0px; margin: 0px;
padding: 8px; padding: 8px;
font-family: arial, sans-serif;
font-size: 14px;
overflow: auto; overflow: auto;
overflow-y: scroll; overflow-y: scroll;
} }