X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=calc%2Fcalc.php;h=7019a80f0d04d4470216869c5f404fca1b469dad;hb=1c7b3124429d83082223253b0f3b6d95d1f5dfcb;hp=a299d45e94b518a5f9005d75f8e2ca2f9e0b270e;hpb=391f57fa395a3ea79e76c1df9e1d66766136ca0f;p=friendica-addons.git
diff --git a/calc/calc.php b/calc/calc.php
old mode 100755
new mode 100644
index a299d45e..7019a80f
--- a/calc/calc.php
+++ b/calc/calc.php
@@ -1,363 +1,359 @@
-
- */
-
-
-function calc_install() {
- register_hook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
-}
-
-function calc_uninstall() {
- unregister_hook('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;
+
+}