mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
[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
|
@ -17,9 +17,9 @@ function pageheader_install() {
|
|||
Hook::register('page_content_top', __FILE__, 'pageheader_fetch');
|
||||
}
|
||||
|
||||
function pageheader_addon_admin(App &$a, string &$s)
|
||||
function pageheader_addon_admin(string &$s)
|
||||
{
|
||||
if (!$a->isSiteAdmin()) {
|
||||
if (!DI::userSession()->isSiteAdmin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -39,9 +39,9 @@ function pageheader_addon_admin(App &$a, string &$s)
|
|||
return;
|
||||
}
|
||||
|
||||
function pageheader_addon_admin_post(App $a)
|
||||
function pageheader_addon_admin_post()
|
||||
{
|
||||
if (!$a->isSiteAdmin()) {
|
||||
if (!DI::userSession()->isSiteAdmin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ function pageheader_addon_admin_post(App $a)
|
|||
}
|
||||
}
|
||||
|
||||
function pageheader_fetch(App $a, string &$b)
|
||||
function pageheader_fetch(string &$b)
|
||||
{
|
||||
if (file_exists('pageheader.html')) {
|
||||
$s = file_get_contents('pageheader.html');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue