mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
Privacy/GDPR friendly version (removed: Social, Gravatar, Facebook, Google, Twitter, DropBox, OwnCloud)
Also removed: POP3, OAuth2 and update feature Added: admin password_hash/password_verify Requires: PHP 7.3+ Replaced: CRLF with LF Replaced: pclZip with ZipArchive
This commit is contained in:
parent
15ceddc202
commit
2cada68f41
293 changed files with 23728 additions and 85420 deletions
|
|
@ -19,11 +19,8 @@ class Storage extends \RainLoop\Providers\AbstractProvider
|
|||
|
||||
/**
|
||||
* @param \RainLoop\Model\Account|string|null $mAccount
|
||||
* @param int $iStorageType
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function verifyAccount($mAccount, $iStorageType)
|
||||
private function verifyAccount($mAccount, int $iStorageType) : bool
|
||||
{
|
||||
if (\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY !== $iStorageType &&
|
||||
!($mAccount instanceof \RainLoop\Model\Account || \is_string($mAccount)))
|
||||
|
|
@ -36,13 +33,9 @@ class Storage extends \RainLoop\Providers\AbstractProvider
|
|||
|
||||
/**
|
||||
* @param \RainLoop\Model\Account|string|null $oAccount
|
||||
* @param int $iStorageType
|
||||
* @param string $sKey
|
||||
* @param string $sValue
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $sValue
|
||||
*/
|
||||
public function Put($oAccount, $iStorageType, $sKey, $sValue)
|
||||
public function Put($oAccount, int $iStorageType, string $sKey, $sValue) : bool
|
||||
{
|
||||
if (!$this->verifyAccount($oAccount, $iStorageType))
|
||||
{
|
||||
|
|
@ -54,13 +47,11 @@ class Storage extends \RainLoop\Providers\AbstractProvider
|
|||
|
||||
/**
|
||||
* @param \RainLoop\Model\Account|string|null $oAccount
|
||||
* @param int $iStorageType
|
||||
* @param string $sKey
|
||||
* @param mixed $mDefault = false
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function Get($oAccount, $iStorageType, $sKey, $mDefault = false)
|
||||
public function Get($oAccount, int $iStorageType, string $sKey, $mDefault = false)
|
||||
{
|
||||
if (!$this->verifyAccount($oAccount, $iStorageType))
|
||||
{
|
||||
|
|
@ -72,12 +63,8 @@ class Storage extends \RainLoop\Providers\AbstractProvider
|
|||
|
||||
/**
|
||||
* @param \RainLoop\Model\Account|string|null $oAccount
|
||||
* @param int $iStorageType
|
||||
* @param string $sKey
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function Clear($oAccount, $iStorageType, $sKey)
|
||||
public function Clear($oAccount, int $iStorageType, string $sKey) : bool
|
||||
{
|
||||
if (!$this->verifyAccount($oAccount, $iStorageType))
|
||||
{
|
||||
|
|
@ -89,26 +76,18 @@ class Storage extends \RainLoop\Providers\AbstractProvider
|
|||
|
||||
/**
|
||||
* @param \RainLoop\Model\Account|string $oAccount
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function DeleteStorage($oAccount)
|
||||
public function DeleteStorage($oAccount) : bool
|
||||
{
|
||||
return $this->oDriver->DeleteStorage($oAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function IsActive()
|
||||
public function IsActive() : bool
|
||||
{
|
||||
return $this->oDriver instanceof \RainLoop\Providers\Storage\IStorage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function IsLocal()
|
||||
public function IsLocal() : bool
|
||||
{
|
||||
return $this->oDriver instanceof \RainLoop\Providers\Storage\IStorage &&
|
||||
$this->oDriver->IsLocal();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue