X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=sniper%2Fsniper.php;h=31c97a843cbf0ad5690454c62791da05870dfa27;hb=d7de9d9bf729806cd362f50b1a968b6c21f3f094;hp=8d31e9cd1fe7ca9fbe3b5f53a876655cbdb9c584;hpb=0c092df7afd2d126a2b2dc1c79445c9f8f87123b;p=friendica-addons.git diff --git a/sniper/sniper.php b/sniper/sniper.php index 8d31e9cd..31c97a84 100644 --- a/sniper/sniper.php +++ b/sniper/sniper.php @@ -1,22 +1,23 @@ */ - +use Friendica\Core\Hook; +use Friendica\DI; function sniper_install() { - register_hook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu'); -} - -function sniper_uninstall() { - unregister_hook('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu'); - + Hook::register('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu'); } function sniper_app_menu($a,&$b) { - $b['app_menu'] .= '
'; + $b['app_menu'][] = ''; } @@ -24,7 +25,7 @@ function sniper_module() {} function sniper_content(&$a) { -$baseurl = $a->get_baseurl() . '/addon/sniper'; +$baseurl = DI::baseUrl()->get() . '/addon/sniper'; $o .= <<< EOT