[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
|
@ -22,15 +22,15 @@ use Friendica\DI;
|
|||
*/
|
||||
function notifyall_module() {}
|
||||
|
||||
function notifyall_addon_admin(App $a, string &$o)
|
||||
function notifyall_addon_admin(string &$o)
|
||||
{
|
||||
$o = '<div></div> <a href="' . DI::baseUrl()->get() . '/notifyall">' . DI::l10n()->t('Send email to all members') . '</a></br/>';
|
||||
}
|
||||
|
||||
|
||||
function notifyall_post(App $a)
|
||||
function notifyall_post()
|
||||
{
|
||||
if (!$a->isSiteAdmin()) {
|
||||
if (!DI::userSession()->isSiteAdmin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -67,9 +67,9 @@ function notifyall_post(App $a)
|
|||
DI::baseUrl()->redirect('admin');
|
||||
}
|
||||
|
||||
function notifyall_content(App $a)
|
||||
function notifyall_content()
|
||||
{
|
||||
if (!$a->isSiteAdmin()) {
|
||||
if (!DI::userSession()->isSiteAdmin()) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue