]> git.mxchange.org Git - friendica-addons.git/blobdiff - impressum/impressum.php
moved HTML stuff into template
[friendica-addons.git] / impressum / impressum.php
index d7cbc6d2d9efb52af81d763cc8b82703e548b224..dc5d355282edc0412c9e01d5cce68b051e402d55 100644 (file)
@@ -8,25 +8,26 @@
  */
 
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Addon;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
+use Friendica\Util\ConfigFileLoader;
 use Friendica\Util\Proxy as ProxyUtils;
 use Friendica\Util\Strings;
 
 function impressum_install() {
-       Addon::registerHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
-    Addon::registerHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
-    Addon::registerHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
+       Hook::register('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
+    Hook::register('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
+    Hook::register('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
     Logger::log("installed impressum Addon");
 }
 
 function impressum_uninstall() {
-       Addon::unregisterHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
-    Addon::unregisterHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
-    Addon::unregisterHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
+       Hook::unregister('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
+    Hook::unregister('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
+    Hook::unregister('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
     Logger::log("uninstalled impressum Addon");
 }
 
@@ -52,9 +53,9 @@ function impressum_footer($a, &$b) {
     }
 }
 
-function impressum_load_config(\Friendica\App $a)
+function impressum_load_config(\Friendica\App $a, ConfigFileLoader $loader)
 {
-       $a->loadConfigFile(__DIR__ . '/config/impressum.config.php');
+       $a->getConfigCache()->load($loader->loadAddonConfig('impressum'));
 }
 
 function impressum_show($a,&$b) {