mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Small improvements
This commit is contained in:
parent
6e6dd31ad4
commit
641fb3e532
6 changed files with 28 additions and 7 deletions
|
|
@ -22,6 +22,16 @@ class Loader
|
|||
*/
|
||||
public static $StoreStatistic = true;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public static $InitTime = 0;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public static $InitMicrotimeTime = 0;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
|
@ -43,7 +53,11 @@ class Loader
|
|||
if (!$bIsInited)
|
||||
{
|
||||
$bIsInited = true;
|
||||
self::SetStatistic('Inited', \microtime(true));
|
||||
|
||||
self::$InitTime = \time();
|
||||
self::$InitMicrotimeTime = \microtime(true);
|
||||
|
||||
self::SetStatistic('Inited', self::$InitMicrotimeTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1276,6 +1276,13 @@ END;
|
|||
*/
|
||||
public static function ResetTimeLimit($iTimeToReset = 15, $iTimeToAdd = 120)
|
||||
{
|
||||
$iTime = \time();
|
||||
if ($iTime < \MailSo\Base\Loader::$InitTime + 5)
|
||||
{
|
||||
// do nothing first 5s
|
||||
return true;
|
||||
}
|
||||
|
||||
static $bValidateAction = null;
|
||||
static $iResetTimer = null;
|
||||
|
||||
|
|
@ -1289,9 +1296,9 @@ END;
|
|||
$bValidateAction = !$bSafeMode && \MailSo\Base\Utils::FunctionExistsAndEnabled('set_time_limit');
|
||||
}
|
||||
|
||||
if ($bValidateAction && $iTimeToReset < \time() - $iResetTimer)
|
||||
if ($bValidateAction && $iTimeToReset < $iTime - $iResetTimer)
|
||||
{
|
||||
$iResetTimer = \time();
|
||||
$iResetTimer = $iTime;
|
||||
if (!@\set_time_limit($iTimeToAdd))
|
||||
{
|
||||
$bValidateAction = false;
|
||||
|
|
|
|||
|
|
@ -528,7 +528,7 @@ en:
|
|||
SETTINGS_FOLDERS:
|
||||
LEGEND_FOLDERS: "Folder List"
|
||||
BUTTON_CREATE: "Create Folder"
|
||||
BUTTON_SYSTEM: "Select System Folders"
|
||||
BUTTON_SYSTEM: "System Folders"
|
||||
BUTTON_DELETE: "Delete"
|
||||
BUTTON_SUBSCRIBE: "Subscribe"
|
||||
BUTTON_UNSUBSCRIBE: "Unsubscribe"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
|
||||
@spinner-background: rgba(255,255,255,.5);
|
||||
@spinner-background: rgba(255,255,255,.4);
|
||||
@spinner-color: #666;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
|
||||
@spinner-background: rgba(255,255,255,.5);
|
||||
@spinner-background: rgba(255,255,255,.4);
|
||||
@spinner-color: #666;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
@login-border: none;
|
||||
@login-border-radius: 7px;
|
||||
|
||||
@spinner-background: rgba(255,255,255,.5);
|
||||
@spinner-background: rgba(255,255,255,.4);
|
||||
@spinner-color: #666;
|
||||
|
||||
// MENU
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue