mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 06:58:27 +03:00
Cleanup RainLoop\Api
This commit is contained in:
parent
7c8039d91d
commit
6d3de4d691
1 changed files with 8 additions and 20 deletions
|
|
@ -2,33 +2,21 @@
|
|||
|
||||
namespace RainLoop;
|
||||
|
||||
class Api
|
||||
abstract class Api
|
||||
{
|
||||
|
||||
function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public static function RunResult() : bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @staticvar bool $bOne
|
||||
*/
|
||||
public static function Handle() : bool
|
||||
{
|
||||
static $bOne = null;
|
||||
if (null === $bOne)
|
||||
static $bOne = false;
|
||||
if (!$bOne)
|
||||
{
|
||||
static::SetupDefaultMailSoConfig();
|
||||
$bOne = static::RunResult();
|
||||
$bOne = true;
|
||||
}
|
||||
return $bOne;
|
||||
}
|
||||
|
||||
final public static function Actions() : Actions
|
||||
public static function Actions() : Actions
|
||||
{
|
||||
static $oActions = null;
|
||||
if (null === $oActions)
|
||||
|
|
@ -153,10 +141,10 @@ class Api
|
|||
$oStorageProvider->DeleteStorage($sEmail);
|
||||
}
|
||||
|
||||
if (static::Actions()->AddressBookProvider() &&
|
||||
static::Actions()->AddressBookProvider()->IsActive())
|
||||
$oAddressBookProvider = static::Actions()->AddressBookProvider();
|
||||
if ($oAddressBookProvider)
|
||||
{
|
||||
static::Actions()->AddressBookProvider()->DeleteAllContacts($sEmail);
|
||||
$oAddressBookProvider->DeleteAllContacts($sEmail);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue