[various] Remove App dependency from hook functions

This commit is contained in:
Hypolite Petovan 2023-01-13 21:16:09 -05:00
parent b53914ee11
commit 39c654da00
87 changed files with 419 additions and 451 deletions

View file

@ -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>&nbsp;&nbsp;&nbsp;&nbsp;<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 '';
}