[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

@ -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');