X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=calc%2Fcalc.php;h=7019a80f0d04d4470216869c5f404fca1b469dad;hb=1c7b3124429d83082223253b0f3b6d95d1f5dfcb;hp=176ade85730e60ca58b73c84175aa946fbdd4fb3;hpb=39dd3dffe07efd69fa1ac6d0bd243c7fc0e3a66f;p=friendica-addons.git
diff --git a/calc/calc.php b/calc/calc.php
index 176ade85..7019a80f 100644
--- a/calc/calc.php
+++ b/calc/calc.php
@@ -1,363 +1,359 @@
-
- */
-use Friendica\Core\Addon;
-
-function calc_install() {
- Addon::registerHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
-}
-
-function calc_uninstall() {
- Addon::unregisterHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
-
-}
-
-function calc_app_menu($a,&$b) {
- $b['app_menu'][] = '
';
-}
-
-
-function calc_module() {}
-
-
-
-
-function calc_init($a) {
-
-$x = <<< EOT
-
-
-
-EOT;
-$a->page['htmlhead'] .= $x;
-}
-
-function calc_content($app) {
-
-$o = '';
-
-$o .= <<< EOT
-
-Calculator
-
-
-
-EOT;
-return $o;
-
-}
+
+ */
+use Friendica\Core\Hook;
+use Friendica\DI;
+
+function calc_install() {
+ Hook::register('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
+}
+
+function calc_app_menu($a,&$b) {
+ $b['app_menu'][] = '';
+}
+
+
+function calc_module() {}
+
+
+
+
+function calc_init($a) {
+
+$x = <<< EOT
+
+
+
+EOT;
+DI::page()['htmlhead'] .= $x;
+}
+
+function calc_content($app) {
+
+$o = '';
+
+$o .= <<< EOT
+
+Calculator
+
+
+
+EOT;
+return $o;
+
+}