[various] Remove App dependency from hook functions
This commit is contained in:
parent
b53914ee11
commit
39c654da00
87 changed files with 419 additions and 451 deletions
|
@ -23,16 +23,15 @@ function phpmailer_install()
|
|||
Hook::register('emailer_send_prepare', __FILE__, 'phpmailer_emailer_send_prepare', 5);
|
||||
}
|
||||
|
||||
function phpmailer_load_config(App $a, ConfigFileManager $loader)
|
||||
function phpmailer_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
$a->getConfigCache()->load($loader->loadAddonConfig('phpmailer'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('phpmailer'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param App $a
|
||||
* @param IEmail $email
|
||||
*/
|
||||
function phpmailer_emailer_send_prepare(App $a, IEmail &$email)
|
||||
function phpmailer_emailer_send_prepare(IEmail &$email)
|
||||
{
|
||||
// Passing `true` enables exceptions
|
||||
$mailer = new PHPMailer(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue