mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Small fixes
This commit is contained in:
parent
5f450e680f
commit
a6e30e5506
5 changed files with 137 additions and 124 deletions
|
|
@ -86,7 +86,19 @@ Consts.Values.SmtpDefaulSecurePort = 465;
|
||||||
* @const
|
* @const
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
Consts.Values.iMessageBodyCacheLimit = 15;
|
Consts.Values.MessageBodyCacheLimit = 15;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @const
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
Consts.Values.AjaxErrorLimit = 7;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @const
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
Consts.Values.TokenErrorLimit = 10;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @const
|
* @const
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,12 @@ AbstractAjaxRemoteStorage.prototype.defaultResponse = function (fCallback, sRequ
|
||||||
Globals.iTokenErrorCount++;
|
Globals.iTokenErrorCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (10 < Globals.iTokenErrorCount)
|
if (Consts.Values.TokenErrorLimit < Globals.iTokenErrorCount)
|
||||||
{
|
{
|
||||||
RL.loginAndLogoutReload(true);
|
RL.loginAndLogoutReload(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oData.Logout || 7 < Globals.iAjaxErrorCount)
|
if (oData.Logout || Consts.Values.AjaxErrorLimit < Globals.iAjaxErrorCount)
|
||||||
{
|
{
|
||||||
if (window.__rlah_clear)
|
if (window.__rlah_clear)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -357,7 +357,7 @@ WebMailDataStorage.prototype.purgeMessageBodyCache = function()
|
||||||
var
|
var
|
||||||
iCount = 0,
|
iCount = 0,
|
||||||
oMessagesBodiesDom = null,
|
oMessagesBodiesDom = null,
|
||||||
iEnd = Globals.iMessageBodyCacheCount - Consts.Values.iMessageBodyCacheLimit
|
iEnd = Globals.iMessageBodyCacheCount - Consts.Values.MessageBodyCacheLimit
|
||||||
;
|
;
|
||||||
|
|
||||||
if (0 < iEnd)
|
if (0 < iEnd)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "RainLoop",
|
"name": "RainLoop",
|
||||||
"title": "RainLoop Webmail",
|
"title": "RainLoop Webmail",
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"release": "516",
|
"release": "517",
|
||||||
"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",
|
||||||
|
|
|
||||||
|
|
@ -1,120 +1,121 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace RainLoop\Providers;
|
namespace RainLoop\Providers;
|
||||||
|
|
||||||
class Contacts extends \RainLoop\Providers\AbstractProvider
|
class Contacts extends \RainLoop\Providers\AbstractProvider
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var \RainLoop\Providers\Contacts\ContactsInterface
|
* @var \RainLoop\Providers\Contacts\ContactsInterface
|
||||||
*/
|
*/
|
||||||
private $oDriver;
|
private $oDriver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \RainLoop\Providers\Contacts\ContactsInterface $oDriver
|
* @param \RainLoop\Providers\Contacts\ContactsInterface $oDriver
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct($oDriver)
|
public function __construct($oDriver)
|
||||||
{
|
{
|
||||||
$this->oDriver = null;
|
$this->oDriver = null;
|
||||||
if ($oDriver instanceof \RainLoop\Providers\Contacts\ContactsInterface)
|
if ($oDriver instanceof \RainLoop\Providers\Contacts\ContactsInterface)
|
||||||
{
|
{
|
||||||
$this->oDriver = $oDriver;
|
$this->oDriver = $oDriver;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function IsActive()
|
public function IsActive()
|
||||||
{
|
{
|
||||||
return $this->oDriver instanceof \RainLoop\Providers\Contacts\ContactsInterface;
|
return $this->oDriver instanceof \RainLoop\Providers\Contacts\ContactsInterface &&
|
||||||
}
|
$this->oDriver->IsSupported();
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return bool
|
/**
|
||||||
*/
|
* @return bool
|
||||||
public function IsSupported()
|
*/
|
||||||
{
|
public function IsSupported()
|
||||||
return $this->oDriver instanceof \RainLoop\Providers\Contacts\ContactsInterface &&
|
{
|
||||||
$this->oDriver->IsSupported();
|
return $this->oDriver instanceof \RainLoop\Providers\Contacts\ContactsInterface &&
|
||||||
}
|
$this->oDriver->IsSupported();
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @param \RainLoop\Account $oAccount
|
/**
|
||||||
* @param int $iIdContact
|
* @param \RainLoop\Account $oAccount
|
||||||
*
|
* @param int $iIdContact
|
||||||
* @return array
|
*
|
||||||
*/
|
* @return array
|
||||||
public function GetContactById($oAccount, $iIdContact)
|
*/
|
||||||
{
|
public function GetContactById($oAccount, $iIdContact)
|
||||||
return $this->oDriver ? $this->oDriver->GetContactById($oAccount, $iIdContact) : null;
|
{
|
||||||
}
|
return $this->oDriver ? $this->oDriver->GetContactById($oAccount, $iIdContact) : null;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @param \RainLoop\Account $oAccount
|
/**
|
||||||
* @param int $iOffset = 0
|
* @param \RainLoop\Account $oAccount
|
||||||
* @param int $iLimit = 20
|
* @param int $iOffset = 0
|
||||||
* @param string $sSearch = ''
|
* @param int $iLimit = 20
|
||||||
*
|
* @param string $sSearch = ''
|
||||||
* @return array
|
*
|
||||||
*/
|
* @return array
|
||||||
public function GetContacts($oAccount, $iOffset = 0, $iLimit = 20, $sSearch = '')
|
*/
|
||||||
{
|
public function GetContacts($oAccount, $iOffset = 0, $iLimit = 20, $sSearch = '')
|
||||||
return $this->oDriver ? $this->oDriver->GetContacts($oAccount, $iOffset, $iLimit, $sSearch) : array();
|
{
|
||||||
}
|
return $this->oDriver ? $this->oDriver->GetContacts($oAccount, $iOffset, $iLimit, $sSearch) : array();
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @param \RainLoop\Account $oAccount
|
/**
|
||||||
*
|
* @param \RainLoop\Account $oAccount
|
||||||
* @return array
|
*
|
||||||
*/
|
* @return array
|
||||||
public function GetContactsImageHashes($oAccount)
|
*/
|
||||||
{
|
public function GetContactsImageHashes($oAccount)
|
||||||
return $this->oDriver ? $this->oDriver->GetContactsImageHashes($oAccount) : array();
|
{
|
||||||
}
|
return $this->oDriver ? $this->oDriver->GetContactsImageHashes($oAccount) : array();
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @param \RainLoop\Account $oAccount
|
/**
|
||||||
* @param \RainLoop\Providers\Contacts\Classes\Contact $oContact
|
* @param \RainLoop\Account $oAccount
|
||||||
*
|
* @param \RainLoop\Providers\Contacts\Classes\Contact $oContact
|
||||||
* @return bool
|
*
|
||||||
*/
|
* @return bool
|
||||||
public function CreateContact($oAccount, &$oContact)
|
*/
|
||||||
{
|
public function CreateContact($oAccount, &$oContact)
|
||||||
return $this->oDriver ? $this->oDriver->CreateContact($oAccount, $oContact) : false;
|
{
|
||||||
}
|
return $this->oDriver ? $this->oDriver->CreateContact($oAccount, $oContact) : false;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @param \RainLoop\Account $oAccount
|
/**
|
||||||
* @param \RainLoop\Providers\Contacts\Classes\Contact $oContact
|
* @param \RainLoop\Account $oAccount
|
||||||
*
|
* @param \RainLoop\Providers\Contacts\Classes\Contact $oContact
|
||||||
* @return bool
|
*
|
||||||
*/
|
* @return bool
|
||||||
public function UpdateContact($oAccount, &$oContact)
|
*/
|
||||||
{
|
public function UpdateContact($oAccount, &$oContact)
|
||||||
return $this->oDriver ? $this->oDriver->UpdateContact($oAccount, $oContact) : false;
|
{
|
||||||
}
|
return $this->oDriver ? $this->oDriver->UpdateContact($oAccount, $oContact) : false;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @param \RainLoop\Account $oAccount
|
/**
|
||||||
* @param array $aContactIds
|
* @param \RainLoop\Account $oAccount
|
||||||
*
|
* @param array $aContactIds
|
||||||
* @return bool
|
*
|
||||||
*/
|
* @return bool
|
||||||
public function DeleteContacts($oAccount, $aContactIds)
|
*/
|
||||||
{
|
public function DeleteContacts($oAccount, $aContactIds)
|
||||||
return $this->oDriver ? $this->oDriver->DeleteContacts($oAccount, $aContactIds) : false;
|
{
|
||||||
}
|
return $this->oDriver ? $this->oDriver->DeleteContacts($oAccount, $aContactIds) : false;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @param \RainLoop\Account $oAccount
|
/**
|
||||||
* @param array $aContactIds
|
* @param \RainLoop\Account $oAccount
|
||||||
*
|
* @param array $aContactIds
|
||||||
* @return bool
|
*
|
||||||
*/
|
* @return bool
|
||||||
public function IncFrec($oAccount, $aContactIds)
|
*/
|
||||||
{
|
public function IncFrec($oAccount, $aContactIds)
|
||||||
return $this->oDriver ? $this->oDriver->IncFrec($oAccount, $aContactIds) : false;
|
{
|
||||||
}
|
return $this->oDriver ? $this->oDriver->IncFrec($oAccount, $aContactIds) : false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue