]> git.mxchange.org Git - friendica-addons.git/blobdiff - cookienotice/cookienotice.php
Changes:
[friendica-addons.git] / cookienotice / cookienotice.php
index 4ca862800b2e78064d2a4dac274561b90703f5e6..5364573ca3571cf16156e3ebd98169c2b96d6e12 100644 (file)
@@ -35,7 +35,7 @@ function cookienotice_install()
  */
 function cookienotice_addon_admin(App $a, &$s)
 {
-       if (!is_site_admin()) {
+       if (!$a->isSiteAdmin()) {
                return;
        }
 
@@ -58,12 +58,11 @@ function cookienotice_addon_admin(App $a, &$s)
  * handles the post request from the admin panel
  *
  * @param App    $a
- *
  * @return void
  */
 function cookienotice_addon_admin_post(App $a)
 {
-       if (!is_site_admin()) {
+       if (!$a->isSiteAdmin()) {
                return;
        }
 
@@ -83,13 +82,10 @@ function cookienotice_addon_admin_post(App $a)
  *
  * @return void
  */
-function cookienotice_page_content_top(App $a, &$b)
+function cookienotice_page_content_top(App $a, array &$b)
 {
-       $stylesheetPath = __DIR__ . '/cookienotice.css';
-       $footerscriptPath = __DIR__ . '/cookienotice.js';
-
-       DI::page()->registerStylesheet($stylesheetPath);
-       DI::page()->registerFooterScript($footerscriptPath);
+       DI::page()->registerStylesheet(__DIR__ . '/cookienotice.css');
+       DI::page()->registerFooterScript(__DIR__ . '/cookienotice.js');
 }
 
 /**
@@ -102,7 +98,7 @@ function cookienotice_page_content_top(App $a, &$b)
  *
  * @return void
  */
-function cookienotice_page_end(App $a, &$b)
+function cookienotice_page_end(App $a, array &$b)
 {
        $text = (string)DI::config()->get('cookienotice', 'text', DI::l10n()->t('This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'));
        $oktext = (string)DI::config()->get('cookienotice', 'oktext', DI::l10n()->t('OK'));