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:
djmaze 2020-03-09 17:04:17 +01:00
parent 15ceddc202
commit 2cada68f41
293 changed files with 23728 additions and 85420 deletions

View file

@ -1,55 +1,55 @@
<?php
/*
* This file is part of MailSo.
*
* (c) 2014 Usenko Timur
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MailSo;
/**
* @category MailSo
*/
class Hooks
{
/**
* @var array
*/
static $aCallbacks = array();
/**
* @param string $sName
* @param array $aArg
*/
static public function Run($sName, $aArg = array())
{
if (isset(\MailSo\Hooks::$aCallbacks[$sName]))
{
foreach (\MailSo\Hooks::$aCallbacks[$sName] as $mCallback)
{
\call_user_func_array($mCallback, $aArg);
}
}
}
/**
* @param string $sName
* @param mixed $mCallback
*/
static public function Add($sName, $mCallback)
{
if (\is_callable($mCallback))
{
if (!isset(\MailSo\Hooks::$aCallbacks[$sName]))
{
\MailSo\Hooks::$aCallbacks[$sName] = array();
}
\MailSo\Hooks::$aCallbacks[$sName][] = $mCallback;
}
}
}
<?php
/*
* This file is part of MailSo.
*
* (c) 2014 Usenko Timur
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MailSo;
/**
* @category MailSo
*/
class Hooks
{
/**
* @var array
*/
static $aCallbacks = array();
/**
* @param string $sName
* @param array $aArg
*/
static public function Run($sName, $aArg = array())
{
if (isset(\MailSo\Hooks::$aCallbacks[$sName]))
{
foreach (\MailSo\Hooks::$aCallbacks[$sName] as $mCallback)
{
\call_user_func_array($mCallback, $aArg);
}
}
}
/**
* @param string $sName
* @param mixed $mCallback
*/
static public function Add($sName, $mCallback)
{
if (\is_callable($mCallback))
{
if (!isset(\MailSo\Hooks::$aCallbacks[$sName]))
{
\MailSo\Hooks::$aCallbacks[$sName] = array();
}
\MailSo\Hooks::$aCallbacks[$sName][] = $mCallback;
}
}
}