mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39: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
|
|
@ -85,73 +85,50 @@ abstract class AbstractPlugin
|
|||
return $this->oPluginManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function Path()
|
||||
public function Path() : string
|
||||
{
|
||||
return $this->sPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function Name()
|
||||
public function Name() : string
|
||||
{
|
||||
return $this->sName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function Version()
|
||||
public function Version() : string
|
||||
{
|
||||
return $this->sVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool | null $bLangs = null
|
||||
* @return bool
|
||||
*/
|
||||
public function UseLangs($bLangs = null)
|
||||
public function UseLangs(?bool $bLangs = null) : bool
|
||||
{
|
||||
if (null !== $bLangs)
|
||||
{
|
||||
$this->bLangs = (bool) $bLangs;
|
||||
$this->bLangs = $bLangs;
|
||||
}
|
||||
|
||||
return $this->bLangs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function configMapping()
|
||||
protected function configMapping() : array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function Hash()
|
||||
public function Hash() : string
|
||||
{
|
||||
return \md5($this->sName.'@'.$this->sVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function Supported()
|
||||
public function Supported() : string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @final
|
||||
* @return array
|
||||
*/
|
||||
final public function ConfigMap()
|
||||
final public function ConfigMap() : array
|
||||
{
|
||||
if (null === $this->aConfigMap)
|
||||
{
|
||||
|
|
@ -165,36 +142,21 @@ abstract class AbstractPlugin
|
|||
return $this->aConfigMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sPath
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function SetPath($sPath)
|
||||
public function SetPath(string $sPath) : self
|
||||
{
|
||||
$this->sPath = $sPath;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sName
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function SetName($sName)
|
||||
public function SetName(string $sName) : self
|
||||
{
|
||||
$this->sName = $sName;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sVersion
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function SetVersion($sVersion)
|
||||
public function SetVersion(string $sVersion) : self
|
||||
{
|
||||
if (0 < \strlen($sVersion))
|
||||
{
|
||||
|
|
@ -204,24 +166,14 @@ abstract class AbstractPlugin
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \RainLoop\Plugins\Manager $oPluginManager
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function SetPluginManager(\RainLoop\Plugins\Manager $oPluginManager)
|
||||
public function SetPluginManager(\RainLoop\Plugins\Manager $oPluginManager) : self
|
||||
{
|
||||
$this->oPluginManager = $oPluginManager;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \RainLoop\Config\Plugin $oPluginConfig
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function SetPluginConfig(\RainLoop\Config\Plugin $oPluginConfig)
|
||||
public function SetPluginConfig(\RainLoop\Config\Plugin $oPluginConfig) : self
|
||||
{
|
||||
$this->oPluginConfig = $oPluginConfig;
|
||||
|
||||
|
|
@ -245,24 +197,14 @@ abstract class AbstractPlugin
|
|||
}
|
||||
|
||||
/**
|
||||
* @param bool $bAdmin
|
||||
* @param bool $bAuth
|
||||
* @param array $aConfig
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function FilterAppDataPluginSection($bAdmin, $bAuth, &$aConfig)
|
||||
public function FilterAppDataPluginSection(bool $bAdmin, bool $bAuth, array &$aConfig)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sHookName
|
||||
* @param string $sFunctionName
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
protected function addHook($sHookName, $sFunctionName)
|
||||
protected function addHook(string $sHookName, string $sFunctionName) : self
|
||||
{
|
||||
if ($this->oPluginManager)
|
||||
{
|
||||
|
|
@ -272,13 +214,7 @@ abstract class AbstractPlugin
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sFile
|
||||
* @param bool $bAdminScope = false
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
protected function addJs($sFile, $bAdminScope = false)
|
||||
protected function addJs(string $sFile, bool $bAdminScope = false) : self
|
||||
{
|
||||
if ($this->oPluginManager)
|
||||
{
|
||||
|
|
@ -288,13 +224,7 @@ abstract class AbstractPlugin
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sFile
|
||||
* @param bool $bAdminScope = false
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
protected function addTemplate($sFile, $bAdminScope = false)
|
||||
protected function addTemplate(string $sFile, bool $bAdminScope = false) : self
|
||||
{
|
||||
if ($this->oPluginManager)
|
||||
{
|
||||
|
|
@ -304,13 +234,7 @@ abstract class AbstractPlugin
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sFile
|
||||
* @param bool $bAdminScope = false
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
protected function replaceTemplate($sFile, $bAdminScope = false)
|
||||
protected function replaceTemplate(string $sFile, bool $bAdminScope = false) : self
|
||||
{
|
||||
if ($this->oPluginManager)
|
||||
{
|
||||
|
|
@ -320,13 +244,7 @@ abstract class AbstractPlugin
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sActionName
|
||||
* @param string $sFunctionName
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
protected function addPartHook($sActionName, $sFunctionName)
|
||||
protected function addPartHook(string $sActionName, string $sFunctionName) : self
|
||||
{
|
||||
if ($this->oPluginManager)
|
||||
{
|
||||
|
|
@ -336,13 +254,7 @@ abstract class AbstractPlugin
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sActionName
|
||||
* @param string $sFunctionName
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
protected function addAjaxHook($sActionName, $sFunctionName)
|
||||
protected function addAjaxHook(string $sActionName, string $sFunctionName) : self
|
||||
{
|
||||
if ($this->oPluginManager)
|
||||
{
|
||||
|
|
@ -352,15 +264,7 @@ abstract class AbstractPlugin
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sName
|
||||
* @param string $sPlace
|
||||
* @param string $sHtml
|
||||
* @param bool $bPrepend = false
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
protected function addTemplateHook($sName, $sPlace, $sLocalTemplateName, $bPrepend = false)
|
||||
protected function addTemplateHook(string $sName, string $sPlace, string $sLocalTemplateName, bool $bPrepend = false) : self
|
||||
{
|
||||
if ($this->oPluginManager)
|
||||
{
|
||||
|
|
@ -371,15 +275,7 @@ abstract class AbstractPlugin
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sName
|
||||
* @param string $sPlace
|
||||
* @param string $sHtml
|
||||
* @param bool $bPrepend = false
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
protected function ajaxResponse($sFunctionName, $aData)
|
||||
protected function ajaxResponse(string $sFunctionName, array $aData) : self
|
||||
{
|
||||
if ($this->oPluginManager)
|
||||
{
|
||||
|
|
@ -391,12 +287,11 @@ abstract class AbstractPlugin
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $sKey
|
||||
* @param mixed $mDefault = null
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function ajaxParam($sKey, $mDefault = null)
|
||||
public function ajaxParam(string $sKey, $mDefault = null)
|
||||
{
|
||||
if ($this->oPluginManager)
|
||||
{
|
||||
|
|
@ -406,10 +301,7 @@ abstract class AbstractPlugin
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getUserSettings()
|
||||
public function getUserSettings() : array
|
||||
{
|
||||
if ($this->oPluginManager)
|
||||
{
|
||||
|
|
@ -419,12 +311,7 @@ abstract class AbstractPlugin
|
|||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $aSettings
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function saveUserSettings($aSettings)
|
||||
public function saveUserSettings(array $aSettings) : bool
|
||||
{
|
||||
if ($this->oPluginManager && \is_array($aSettings))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue