Code optimizations

This commit is contained in:
RainLoop Team 2015-01-05 04:26:08 +04:00
parent b4d6468094
commit 1613a4528b
8 changed files with 45 additions and 29 deletions

View file

@ -1,9 +1,7 @@
imap_host = "IMAP_HOST"
imap_port = IMAP_PORT
imap_secure = "SSL"
imap_verify_ssl = Off
smtp_host = "SMTP_HOST"
smtp_port = SMTP_PORT
smtp_secure = "SSL"
smtp_verify_ssl = Off
smtp_auth = On

View file

@ -0,0 +1 @@
outlook.com,qq.com,yahoo.com

View file

@ -1,9 +1,7 @@
imap_host = "imap.gmail.com"
imap_port = 993
imap_secure = "SSL"
imap_verify_ssl = Off
smtp_host = "smtp.gmail.com"
smtp_port = 465
smtp_secure = "SSL"
smtp_verify_ssl = Off
smtp_auth = On

View file

@ -1,9 +1,7 @@
imap_host = "imap-mail.outlook.com"
imap_port = 993
imap_secure = "SSL"
imap_verify_ssl = Off
smtp_host = "smtp-mail.outlook.com"
smtp_port = 587
smtp_secure = "TLS"
smtp_verify_ssl = Off
smtp_auth = On

View file

@ -1,9 +1,7 @@
imap_host = "imap.qq.com"
imap_port = 993
imap_secure = "SSL"
imap_verify_ssl = Off
smtp_host = "smtp.qq.com"
smtp_port = 465
smtp_secure = "SSL"
smtp_verify_ssl = Off
smtp_auth = On

View file

@ -1,9 +1,7 @@
imap_host = "imap.mail.yahoo.com"
imap_port = 993
imap_secure = "SSL"
imap_verify_ssl = Off
smtp_host = "smtp.mail.yahoo.com"
smtp_port = 465
smtp_secure = "SSL"
smtp_verify_ssl = Off
smtp_auth = On

View file

@ -3588,9 +3588,10 @@ class Actions
public function removeOldVersion()
{
$sVPath = APP_INDEX_ROOT_PATH.'rainloop/v/';
$this->Logger()->Write('Versions GC: Begin');
$sVPath = APP_INDEX_ROOT_PATH.'rainloop/v/';
$aDirs = @\array_map('basename', @\array_filter(@\glob($sVPath.'*'), 'is_dir'));
$this->Logger()->Write('Versions GC: Count:'.(\is_array($aDirs) ? \count($aDirs) : 0));
@ -3604,9 +3605,18 @@ class Actions
if (APP_DEV_VERSION !== $sName && APP_VERSION !== $sName)
{
$this->Logger()->Write('Versions GC: Begin to remove "'.$sVPath.$sName.'" version');
@\MailSo\Base\Utils::RecRmDir($sVPath.$sName);
$this->Logger()->Write('Versions GC: End to remove "'.$sVPath.$sName.'" version');
if (@\unlink($sVPath.$sName.'/index.php'))
{
@\MailSo\Base\Utils::RecRmDir($sVPath.$sName);
}
else
{
$this->Logger()->Write('Versions GC (Error): index file cant be removed from"'.$sVPath.$sName.'"',
\MailSo\Log\Enumerations\Type::ERROR);
}
$this->Logger()->Write('Versions GC: End to remove "'.$sVPath.$sName.'" version');
break;
}
}