]> git.mxchange.org Git - friendica-addons.git/commitdiff
[various] Remove redundant uninstall functions
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 27 Jul 2020 12:30:41 +0000 (08:30 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 27 Jul 2020 12:30:41 +0000 (08:30 -0400)
- All hooks (current and obsolete) are removed automatically during addon uninstall

77 files changed:
advancedcontentfilter/advancedcontentfilter.php
blackout/blackout.php
blockbot/blockbot.php
blockem/blockem.php
blogger/blogger.php
buffer/buffer.php
buglink/buglink.php
calc/calc.php
catavatar/catavatar.php
convert/convert.php
curweather/curweather.php
diaspora/diaspora.php
dwpost/dwpost.php
forumdirectory/forumdirectory.php
fromapp/fromapp.php
geocoordinates/geocoordinates.php
gnot/gnot.php
googlemaps/googlemaps.php
gravatar/gravatar.php
group_text/group_text.php
highlightjs/highlightjs.php
ifttt/ifttt.php
ijpost/ijpost.php
impressum/impressum.php
infiniteimprobabilitydrive/infiniteimprobabilitydrive.php
irc/irc.php
jappixmini/jappixmini.php
krynn/krynn.php
langfilter/langfilter.php
ldapauth/ldapauth.php
leistungsschutzrecht/leistungsschutzrecht.php
libertree/libertree.php
libravatar/libravatar.php
ljpost/ljpost.php
mahjongg/mahjongg.php
mailstream/mailstream.php
mastodoncustomemojis/mastodoncustomemojis.php
mathjax/mathjax.php
membersince/membersince.php
morechoice/morechoice.php
morepokes/morepokes.php
namethingy/namethingy.php
newmemberwidget/newmemberwidget.php
notifyall/notifyall.php
notimeline/notimeline.php
nsfw/nsfw.php
numfriends/numfriends.php
openstreetmap/openstreetmap.php
piwik/piwik.php
planets/planets.php
public_server/public_server.php
pumpio/pumpio.php
qcomment/qcomment.php
randplace/randplace.php
remote_permissions/remote_permissions.php
rendertime/rendertime.php
securemail/securemail.php
showmore/showmore.php
smiley_pack/lang/smiley_pack_es/smiley_pack_es.php
smiley_pack/lang/smiley_pack_fr/smiley_pack_fr.php
smiley_pack/smiley_pack.php
smileybutton/smileybutton.php
smilies_adult/smilies_adult.php
sniper/sniper.php
startpage/startpage.php
statusnet/statusnet.php
superblock/superblock.php
testdrive/testdrive.php
tictac/tictac.php
tumblr/tumblr.php
unicode_smilies/unicode_smilies.php
viewsrc/viewsrc.php
webrtc/webrtc.php
widgets/widgets.php
windowsphonepush/windowsphonepush.php
wppost/wppost.php
xmpp/xmpp.php

index 866b0b11f0a1e3f0845b060a64b0bf5541974401..c539075bb733c8c92ba12203342d3e44d7e44ce7 100644 (file)
@@ -65,13 +65,6 @@ function advancedcontentfilter_install(App $a)
        Logger::log("installed advancedcontentfilter");
 }
 
-function advancedcontentfilter_uninstall()
-{
-       Hook::unregister('dbstructure_definition'     , __FILE__, 'advancedcontentfilter_dbstructure_definition');
-       Hook::unregister('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
-       Hook::unregister('addon_settings'             , __FILE__, 'advancedcontentfilter_addon_settings');
-}
-
 /*
  * Hooks
  */
index 19f99f1e8132e105c436605e92bd9f521cee7bec..83b2dbc1a10f6e2a629b566a4474840a94391420 100644 (file)
@@ -54,9 +54,6 @@ function blackout_install() {
        Hook::register('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
 }
 
-function blackout_uninstall() {
-       Hook::unregister('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
-}
 function blackout_redirect ($a, $b) {
        // if we have a logged in user, don't throw her out
        if (local_user()) {
index 61715b28967c605c1a6222627d8d85b12b494577..eee222df2ae0a1de7009edc24d3f67c38e7f13ad 100644 (file)
@@ -22,11 +22,6 @@ function blockbot_install() {
        Hook::register('init_1', __FILE__, 'blockbot_init_1');
 }
 
-
-function blockbot_uninstall() {
-       Hook::unregister('init_1', __FILE__, 'blockbot_init_1');
-}
-
 function blockbot_addon_admin(&$a, &$o) {
        $t = Renderer::getMarkupTemplate("admin.tpl", "addon/blockbot/");
 
index 1a317284162c8a7da9ec9259f692aabc4a9e7645..1880b9be44e5029bcc36a7da1e20c78746177bc8 100644 (file)
@@ -23,18 +23,6 @@ function blockem_install()
        Hook::register('enotify_store'              , 'addon/blockem/blockem.php', 'blockem_enotify_store');
 }
 
-function blockem_uninstall()
-{
-       Hook::unregister('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
-       Hook::unregister('prepare_body'               , 'addon/blockem/blockem.php', 'blockem_prepare_body');
-       Hook::unregister('display_item'               , 'addon/blockem/blockem.php', 'blockem_display_item');
-       Hook::unregister('addon_settings'             , 'addon/blockem/blockem.php', 'blockem_addon_settings');
-       Hook::unregister('addon_settings_post'        , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
-       Hook::unregister('conversation_start'         , 'addon/blockem/blockem.php', 'blockem_conversation_start');
-       Hook::unregister('item_photo_menu'            , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
-       Hook::unregister('enotify_store'              , 'addon/blockem/blockem.php', 'blockem_enotify_store');
-}
-
 function blockem_addon_settings (App $a, &$s)
 {
        if (!local_user()) {
index 0d201305facb78a3f8b06e067ee895c43cdc4b58..5cf0d27b3f22397a717bd42437ed5c1fd5192e76 100644 (file)
@@ -23,22 +23,6 @@ function blogger_install()
        Hook::register('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
 }
 
-function blogger_uninstall()
-{
-       Hook::unregister('hook_fork',               'addon/blogger/blogger.php', 'blogger_hook_fork');
-       Hook::unregister('post_local',              'addon/blogger/blogger.php', 'blogger_post_local');
-       Hook::unregister('notifier_normal',         'addon/blogger/blogger.php', 'blogger_send');
-       Hook::unregister('jot_networks',            'addon/blogger/blogger.php', 'blogger_jot_nets');
-       Hook::unregister('connector_settings',      'addon/blogger/blogger.php', 'blogger_settings');
-       Hook::unregister('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
-
-       // obsolete - remove
-       Hook::unregister('post_local_end',      'addon/blogger/blogger.php', 'blogger_send');
-       Hook::unregister('addon_settings',      'addon/blogger/blogger.php', 'blogger_settings');
-       Hook::unregister('addon_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
-}
-
-
 function blogger_jot_nets(App $a, array &$jotnets_fields)
 {
        if (!local_user()) {
index 2a7004c82a2ad39f142ba39466a922c5b03fd5f6..9bbdf21e529850b09f0524494abd1eac4c6d1eb6 100644 (file)
@@ -29,16 +29,6 @@ function buffer_install()
        Hook::register('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
 }
 
-function buffer_uninstall()
-{
-       Hook::unregister('hook_fork',               'addon/buffer/buffer.php', 'buffer_hook_fork');
-       Hook::unregister('post_local',              'addon/buffer/buffer.php', 'buffer_post_local');
-       Hook::unregister('notifier_normal',         'addon/buffer/buffer.php', 'buffer_send');
-       Hook::unregister('jot_networks',            'addon/buffer/buffer.php', 'buffer_jot_nets');
-       Hook::unregister('connector_settings',      'addon/buffer/buffer.php', 'buffer_settings');
-       Hook::unregister('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
-}
-
 function buffer_module()
 {
 }
index 2414a3a32df6096b484245d6b1e4b9cecef9c9b8..9ea20b56ed262a931b1d025e9410309db03dd757 100644 (file)
@@ -15,11 +15,6 @@ function buglink_install()
        Hook::register('page_end', 'addon/buglink/buglink.php', 'buglink_active');
 }
 
-function buglink_uninstall()
-{
-       Hook::unregister('page_end', 'addon/buglink/buglink.php', 'buglink_active');
-}
-
 function buglink_active(App $a, &$b)
 {
        $b .= '<div id="buglink_wrapper" style="position: fixed; bottom: 5px; left: 5px;"><a href="https://github.com/friendica/friendica/issues" target="_blank" rel="noopener noreferrer" title="' . DI::l10n()->t('Report Bug') . '"><img src="addon/buglink/bug-x.gif" alt="' . DI::l10n()->t('Report Bug') . '" /></a></div>';
index 61e9c5db806e2f88133ecc6078181de4bedb52b8..7019a80f0d04d4470216869c5f404fca1b469dad 100644 (file)
@@ -12,11 +12,6 @@ function calc_install() {
        Hook::register('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
 }
 
-function calc_uninstall() {
-       Hook::unregister('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
-
-}
-
 function calc_app_menu($a,&$b) {
        $b['app_menu'][] = '<div class="app-title"><a href="calc">Calculator</a></div>'; 
 }
index db67a355463493430ee96fd99d5884838579ae80..e0daa6cd7b65b208f11170743a143bf85ab2ff78 100644 (file)
@@ -31,18 +31,6 @@ function catavatar_install()
        Logger::log('registered catavatar');
 }
 
-/**
- * Removes the addon hook
- */
-function catavatar_uninstall()
-{
-       Hook::unregister('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
-       Hook::unregister('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
-       Hook::unregister('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
-
-       Logger::log('unregistered catavatar');
-}
-
 /**
  * Cat avatar user settings page
  */
index e95637418454c552e89343f96cf3d03646d4cdda..5449cc14bc0f1f683ccdfc7a1a915880f348f9e0 100644 (file)
-<?php\r
-/**\r
- * Name: Converter App\r
- * Description: Unit converter application\r
- * Version: 1.0\r
- * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>\r
- */\r
-use Friendica\Core\Hook;\r
-\r
-function convert_install() {\r
-       Hook::register('app_menu', 'addon/convert/convert.php', 'convert_app_menu');\r
-}\r
-\r
-function convert_uninstall() {\r
-       Hook::unregister('app_menu', 'addon/convert/convert.php', 'convert_app_menu');\r
-}\r
-\r
-function convert_app_menu($a,&$b) {\r
-       $b['app_menu'][] = '<div class="app-title"><a href="convert">Units Conversion</a></div>';\r
-}\r
-\r
-\r
-function convert_module() {}\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-function convert_content($app) {\r
-\r
-include("UnitConvertor.php");\r
-\r
- class TP_Converter extends UnitConvertor {\r
-       function TP_Converter($lang = "en")\r
-       {\r
-               if ($lang != 'en' ) {\r
-                       $dec_point = '.'; $thousand_sep = "'";\r
-               } else {\r
-                       $dec_point = '.'; $thousand_sep = ",";\r
-               }\r
-\r
-               $this->UnitConvertor($dec_point , $thousand_sep );\r
-\r
-       } // end func UnitConvertor\r
-\r
-       function find_base_unit($from,$to) {\r
-               while (list($skey,$sval) = each($this->bases)) {\r
-                               if ($skey == $from || $to == $skey || in_array($to,$sval) || in_array($from,$sval)) {\r
-                                       return $skey;\r
-                               }\r
-               }\r
-               return false;\r
-       }\r
-\r
-       function getTable($value, $from_unit, $to_unit, $precision) {\r
-\r
-               if ($base_unit = $this->find_base_unit($from_unit,$to_unit)) {\r
-\r
-                       // A baseunit was found now lets convert from -> $base_unit\r
-\r
-                               $cell ['value'] = $this->convert($value, $from_unit, $base_unit, $precision)." ".$base_unit;\r
-                               $cell ['class'] = ($base_unit == $from_unit || $base_unit == $to_unit) ? "framedred": "";\r
-                               $cells[] = $cell;\r
-                       // We now have the base unit and value now lets produce the table;\r
-                       while (list($key,$val) = each($this->bases[$base_unit])) {\r
-                               $cell ['value'] = $this->convert($value, $from_unit, $val, $precision)." ".$val;\r
-                               $cell ['class'] = ($val == $from_unit || $val == $to_unit) ? "framedred": "";\r
-                               $cells[] = $cell;\r
-                       }\r
-\r
-                       $cc = count($cells);\r
-                       $string = "<table class=\"framed grayish\" border=\"1\" cellpadding=\"5\" width=\"80%\" align=\"center\"><tr>";\r
-                       $string .= "<td rowspan=\"$cc\" align=\"center\">$value $from_unit</td>";\r
-                       $i=0;\r
-                       foreach ($cells as $cell) {\r
-                               if ($i==0) {\r
-                                       $string .= "<td class=\"".$cell['class']."\">".$cell['value']."</td>";\r
-                                       $i++;\r
-                               } else {\r
-                                       $string .= "</tr><tr><td class=\"".$cell['class']."\">".$cell['value']."</td>";\r
-                               }\r
-                       }\r
-                       $string .= "</tr></table>";\r
-                       return $string;\r
-               }\r
-\r
-       }\r
-}\r
-\r
-\r
-$conv = new TP_Converter('en');\r
-\r
-\r
-$conversions = [\r
-       'Temperature'=>['base' =>'Celsius',\r
-               'conv'=>[\r
-                       'Fahrenheit'=>['ratio'=>1.8, 'offset'=>32],\r
-                       'Kelvin'=>['ratio'=>1, 'offset'=>273],\r
-                       'Reaumur'=>0.8\r
-               ]\r
-       ],\r
-       'Weight' => ['base' =>'kg',\r
-               'conv'=>[\r
-                       'g'=>1000,\r
-                       'mg'=>1000000,\r
-                       't'=>0.001,\r
-                       'grain'=>15432,\r
-                       'oz'=>35.274,\r
-                       'lb'=>2.2046,\r
-                       'cwt(UK)'       => 0.019684,\r
-                       'cwt(US)'       => 0.022046,\r
-                       'ton (US)'      => 0.0011023,\r
-                       'ton (UK)'      => 0.0009842\r
-               ]\r
-       ],\r
-       'Distance' => ['base' =>'km',\r
-               'conv'=>[\r
-                       'm'=>1000,\r
-                       'dm'=>10000,\r
-                       'cm'=>100000,\r
-                       'mm'=>1000000,\r
-                       'mile'=>0.62137,\r
-                       'naut.mile'=>0.53996,\r
-                       'inch(es)'=>39370,\r
-                       'ft'=>3280.8,\r
-                       'yd'=>1093.6,\r
-                       'furlong'=>4.970969537898672,\r
-                       'fathom'=>546.8066491688539\r
-               ]\r
-       ],\r
-       'Area' => ['base' =>'km 2',\r
-               'conv'=>[\r
-                       'ha'=>100,\r
-                       'acre'=>247.105,\r
-                       'm 2'=>pow(1000,2),\r
-                       'dm 2'=>pow(10000,2),\r
-                       'cm 2'=>pow(100000,2),\r
-                       'mm 2'=>pow(1000000,2),\r
-                       'mile 2'=>pow(0.62137,2),\r
-                       'naut.miles 2'=>pow(0.53996,2),\r
-                       'in 2'=>pow(39370,2),\r
-                       'ft 2'=>pow(3280.8,2),\r
-                       'yd 2'=>pow(1093.6,2),\r
-               ]\r
-       ],\r
-       'Volume' => ['base' =>'m 3',\r
-               'conv'=>[\r
-                       'in 3'=>61023.6,\r
-                       'ft 3'=>35.315,\r
-                       'cm 3'=>pow(10,6),\r
-                       'dm 3'=>1000,\r
-                       'litre'=>1000,\r
-                       'hl'=>10,\r
-                       'yd 3'=>1.30795,\r
-                       'gal(US)'=>264.172,\r
-                       'gal(UK)'=>219.969,\r
-                       'pint' => 2113.376,\r
-                       'quart' => 1056.688,\r
-                       'cup' => 4266.753,\r
-                       'fl oz' => 33814.02,\r
-                       'tablespoon' => 67628.04,\r
-                       'teaspoon' => 202884.1,\r
-                       'pt (UK)'=>1000/0.56826,\r
-                       'barrel petroleum'=>1000/158.99,\r
-                       'Register Tons'=>2.832,\r
-                       'Ocean Tons'=>1.1327\r
-               ]\r
-       ],\r
-       'Speed' =>['base' =>'kmph',\r
-               'conv'=>[\r
-                       'mps'=>0.0001726031,\r
-                       'milesph'=>0.62137,\r
-                       'knots'=>0.53996,\r
-                       'mach STP'=>0.0008380431,\r
-                       'c (warp)'=>9.265669e-10\r
-               ]\r
-       ]\r
-];\r
-\r
-\r
-while (list($key,$val) = each($conversions)) {\r
-       $conv->addConversion($val['base'], $val['conv']);\r
-       $list[$key][] = $val['base'];\r
-       while (list($ukey,$uval) = each($val['conv'])) {\r
-               $list[$key][] = $ukey;\r
-       }\r
-}\r
-\r
-  $o .= '<h3>Unit Conversions</h3>';\r
-\r
-\r
-       if (isset($_POST['from_unit']) && isset($_POST['value'])) {\r
-       $_POST['value'] = $_POST['value'] + 0;\r
-\r
-\r
-               $o .= ($conv->getTable($_POST['value'], $_POST['from_unit'], $_POST['to_unit'], 5))."</p>";\r
-       } else {\r
-               $o .= "<p>Select:</p>";\r
-       }\r
-\r
-       if(isset($_POST['value']))\r
-               $value = $_POST['value'];\r
-       else\r
-               $value = '';\r
-\r
-       $o .= '<form action="convert" method="post" name="conversion">';\r
-    $o .= '<input name="value" type="text" id="value" value="' . $value . '" size="10" maxlength="10" />';\r
-    $o .= '<select name="from_unit" size="12">';\r
-\r
-\r
-\r
-       reset($list);\r
-       while(list($key,$val) = each($list)) {\r
-               $o .=  "\n\t<optgroup label=\"$key\">";\r
-               while(list($ukey,$uval) = each($val)) {\r
-                       $selected = (($uval == $_POST['from_unit']) ? ' selected="selected" ' : '');\r
-                       $o .=  "\n\t\t<option value=\"$uval\" $selected >$uval</option>";\r
-               }\r
-               $o .= "\n\t</optgroup>";\r
-       }\r
-\r
-       $o .= '</select>';\r
-\r
-    $o .= '<input type="submit" name="Submit" value="Submit" /></form>';\r
-\r
-       return $o;\r
-}\r
+<?php
+/**
+ * Name: Converter App
+ * Description: Unit converter application
+ * Version: 1.0
+ * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
+ */
+use Friendica\Core\Hook;
+
+function convert_install() {
+       Hook::register('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
+}
+
+function convert_app_menu($a,&$b) {
+       $b['app_menu'][] = '<div class="app-title"><a href="convert">Units Conversion</a></div>';
+}
+
+
+function convert_module() {}
+
+
+
+
+
+
+
+function convert_content($app) {
+
+include("UnitConvertor.php");
+
+ class TP_Converter extends UnitConvertor {
+       function TP_Converter($lang = "en")
+       {
+               if ($lang != 'en' ) {
+                       $dec_point = '.'; $thousand_sep = "'";
+               } else {
+                       $dec_point = '.'; $thousand_sep = ",";
+               }
+
+               $this->UnitConvertor($dec_point , $thousand_sep );
+
+       } // end func UnitConvertor
+
+       function find_base_unit($from,$to) {
+               while (list($skey,$sval) = each($this->bases)) {
+                               if ($skey == $from || $to == $skey || in_array($to,$sval) || in_array($from,$sval)) {
+                                       return $skey;
+                               }
+               }
+               return false;
+       }
+
+       function getTable($value, $from_unit, $to_unit, $precision) {
+
+               if ($base_unit = $this->find_base_unit($from_unit,$to_unit)) {
+
+                       // A baseunit was found now lets convert from -> $base_unit
+
+                               $cell ['value'] = $this->convert($value, $from_unit, $base_unit, $precision)." ".$base_unit;
+                               $cell ['class'] = ($base_unit == $from_unit || $base_unit == $to_unit) ? "framedred": "";
+                               $cells[] = $cell;
+                       // We now have the base unit and value now lets produce the table;
+                       while (list($key,$val) = each($this->bases[$base_unit])) {
+                               $cell ['value'] = $this->convert($value, $from_unit, $val, $precision)." ".$val;
+                               $cell ['class'] = ($val == $from_unit || $val == $to_unit) ? "framedred": "";
+                               $cells[] = $cell;
+                       }
+
+                       $cc = count($cells);
+                       $string = "<table class=\"framed grayish\" border=\"1\" cellpadding=\"5\" width=\"80%\" align=\"center\"><tr>";
+                       $string .= "<td rowspan=\"$cc\" align=\"center\">$value $from_unit</td>";
+                       $i=0;
+                       foreach ($cells as $cell) {
+                               if ($i==0) {
+                                       $string .= "<td class=\"".$cell['class']."\">".$cell['value']."</td>";
+                                       $i++;
+                               } else {
+                                       $string .= "</tr><tr><td class=\"".$cell['class']."\">".$cell['value']."</td>";
+                               }
+                       }
+                       $string .= "</tr></table>";
+                       return $string;
+               }
+
+       }
+}
+
+
+$conv = new TP_Converter('en');
+
+
+$conversions = [
+       'Temperature'=>['base' =>'Celsius',
+               'conv'=>[
+                       'Fahrenheit'=>['ratio'=>1.8, 'offset'=>32],
+                       'Kelvin'=>['ratio'=>1, 'offset'=>273],
+                       'Reaumur'=>0.8
+               ]
+       ],
+       'Weight' => ['base' =>'kg',
+               'conv'=>[
+                       'g'=>1000,
+                       'mg'=>1000000,
+                       't'=>0.001,
+                       'grain'=>15432,
+                       'oz'=>35.274,
+                       'lb'=>2.2046,
+                       'cwt(UK)'       => 0.019684,
+                       'cwt(US)'       => 0.022046,
+                       'ton (US)'      => 0.0011023,
+                       'ton (UK)'      => 0.0009842
+               ]
+       ],
+       'Distance' => ['base' =>'km',
+               'conv'=>[
+                       'm'=>1000,
+                       'dm'=>10000,
+                       'cm'=>100000,
+                       'mm'=>1000000,
+                       'mile'=>0.62137,
+                       'naut.mile'=>0.53996,
+                       'inch(es)'=>39370,
+                       'ft'=>3280.8,
+                       'yd'=>1093.6,
+                       'furlong'=>4.970969537898672,
+                       'fathom'=>546.8066491688539
+               ]
+       ],
+       'Area' => ['base' =>'km 2',
+               'conv'=>[
+                       'ha'=>100,
+                       'acre'=>247.105,
+                       'm 2'=>pow(1000,2),
+                       'dm 2'=>pow(10000,2),
+                       'cm 2'=>pow(100000,2),
+                       'mm 2'=>pow(1000000,2),
+                       'mile 2'=>pow(0.62137,2),
+                       'naut.miles 2'=>pow(0.53996,2),
+                       'in 2'=>pow(39370,2),
+                       'ft 2'=>pow(3280.8,2),
+                       'yd 2'=>pow(1093.6,2),
+               ]
+       ],
+       'Volume' => ['base' =>'m 3',
+               'conv'=>[
+                       'in 3'=>61023.6,
+                       'ft 3'=>35.315,
+                       'cm 3'=>pow(10,6),
+                       'dm 3'=>1000,
+                       'litre'=>1000,
+                       'hl'=>10,
+                       'yd 3'=>1.30795,
+                       'gal(US)'=>264.172,
+                       'gal(UK)'=>219.969,
+                       'pint' => 2113.376,
+                       'quart' => 1056.688,
+                       'cup' => 4266.753,
+                       'fl oz' => 33814.02,
+                       'tablespoon' => 67628.04,
+                       'teaspoon' => 202884.1,
+                       'pt (UK)'=>1000/0.56826,
+                       'barrel petroleum'=>1000/158.99,
+                       'Register Tons'=>2.832,
+                       'Ocean Tons'=>1.1327
+               ]
+       ],
+       'Speed' =>['base' =>'kmph',
+               'conv'=>[
+                       'mps'=>0.0001726031,
+                       'milesph'=>0.62137,
+                       'knots'=>0.53996,
+                       'mach STP'=>0.0008380431,
+                       'c (warp)'=>9.265669e-10
+               ]
+       ]
+];
+
+
+while (list($key,$val) = each($conversions)) {
+       $conv->addConversion($val['base'], $val['conv']);
+       $list[$key][] = $val['base'];
+       while (list($ukey,$uval) = each($val['conv'])) {
+               $list[$key][] = $ukey;
+       }
+}
+
+  $o .= '<h3>Unit Conversions</h3>';
+
+
+       if (isset($_POST['from_unit']) && isset($_POST['value'])) {
+       $_POST['value'] = $_POST['value'] + 0;
+
+
+               $o .= ($conv->getTable($_POST['value'], $_POST['from_unit'], $_POST['to_unit'], 5))."</p>";
+       } else {
+               $o .= "<p>Select:</p>";
+       }
+
+       if(isset($_POST['value']))
+               $value = $_POST['value'];
+       else
+               $value = '';
+
+       $o .= '<form action="convert" method="post" name="conversion">';
+    $o .= '<input name="value" type="text" id="value" value="' . $value . '" size="10" maxlength="10" />';
+    $o .= '<select name="from_unit" size="12">';
+
+
+
+       reset($list);
+       while(list($key,$val) = each($list)) {
+               $o .=  "\n\t<optgroup label=\"$key\">";
+               while(list($ukey,$uval) = each($val)) {
+                       $selected = (($uval == $_POST['from_unit']) ? ' selected="selected" ' : '');
+                       $o .=  "\n\t\t<option value=\"$uval\" $selected >$uval</option>";
+               }
+               $o .= "\n\t</optgroup>";
+       }
+
+       $o .= '</select>';
+
+    $o .= '<input type="submit" name="Submit" value="Submit" /></form>';
+
+       return $o;
+}
index 2ee55b2643dae6ee1b2c78ee0902ae9b790c8b29..2b8682d157168316df0a46ccb7641e6082867fd1 100644 (file)
@@ -24,13 +24,6 @@ function curweather_install()
        Hook::register('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
 }
 
-function curweather_uninstall()
-{
-       Hook::unregister('network_mod_init'   , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
-       Hook::unregister('addon_settings'     , 'addon/curweather/curweather.php', 'curweather_addon_settings');
-       Hook::unregister('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
-}
-
 //  get the weather data from OpenWeatherMap
 function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cachetime = 0)
 {
index 0a43462c6048af53677b6d6cb1152fd6b3cf1939..77aef3af0a1742eddd8d8bd32af0e22a63bb1e01 100644 (file)
@@ -29,16 +29,6 @@ function diaspora_install()
        Hook::register('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
 }
 
-function diaspora_uninstall()
-{
-       Hook::unregister('hook_fork',               'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
-       Hook::unregister('post_local',              'addon/diaspora/diaspora.php', 'diaspora_post_local');
-       Hook::unregister('notifier_normal',         'addon/diaspora/diaspora.php', 'diaspora_send');
-       Hook::unregister('jot_networks',            'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
-       Hook::unregister('connector_settings',      'addon/diaspora/diaspora.php', 'diaspora_settings');
-       Hook::unregister('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
-}
-
 function diaspora_jot_nets(App $a, array &$jotnets_fields)
 {
        if (!local_user()) {
index 9a973b672f2859d633bfca96d42ceb706fc973d8..da35aa0fd5d97b4757edd0b4dbe9a61b36170cb8 100644 (file)
@@ -27,15 +27,6 @@ function dwpost_install()
        Hook::register('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
 }
 
-function dwpost_uninstall()
-{
-       Hook::unregister('post_local',              'addon/dwpost/dwpost.php', 'dwpost_post_local');
-       Hook::unregister('notifier_normal',         'addon/dwpost/dwpost.php', 'dwpost_send');
-       Hook::unregister('jot_networks',            'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
-       Hook::unregister('connector_settings',      'addon/dwpost/dwpost.php', 'dwpost_settings');
-       Hook::unregister('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
-}
-
 function dwpost_jot_nets(App $a, array &$jotnets_fields)
 {
        if (!local_user()) {
index 2b12bf51ef4ce0d825c7127f24ddb49cb4bbb6ad..ce37e8e55542e23fbd28ba163fd813b71491da11 100644 (file)
@@ -23,11 +23,6 @@ function forumdirectory_install()
        Hook::register('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
 }
 
-function forumdirectory_uninstall()
-{
-       Hook::unregister('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
-}
-
 function forumdirectory_module()
 {
        return;
index 6c8e4717a150521d91cc9a0eafe44408b98dc56d..073b632c7f0b0c4f45ccf165d656a085f50388c3 100644 (file)
@@ -18,15 +18,6 @@ function fromapp_install()
        Logger::log("installed fromapp");
 }
 
-
-function fromapp_uninstall()
-{
-       Hook::unregister('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
-       Hook::unregister('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
-       Hook::unregister('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
-       Logger::log("removed fromapp");
-}
-
 function fromapp_settings_post($a, $post)
 {
        if (!local_user() || empty($_POST['fromapp-submit'])) {
index ef96ecb861339af730c5bfa46717c027d0b39267..937e2f8c195b53e138b4b51b26ecf816e0ec5897 100644 (file)
@@ -18,13 +18,6 @@ function geocoordinates_install()
        Hook::register('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
 }
 
-
-function geocoordinates_uninstall()
-{
-       Hook::unregister('post_local',    'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
-       Hook::unregister('post_remote',    'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
-}
-
 function geocoordinates_resolve_item(&$item)
 {
        if((!$item["coord"]) || ($item["location"]))
index f24db4a1b317f552fea689ad8fd386756ccdfc53..8420ffe498e38addfd097ba5d1d84b9a8b61519b 100644 (file)
@@ -22,19 +22,6 @@ function gnot_install() {
        Logger::log("installed gnot");
 }
 
-
-function gnot_uninstall() {
-
-       Hook::unregister('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
-       Hook::unregister('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
-       Hook::unregister('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
-
-
-       Logger::log("removed gnot");
-}
-
-
-
 /**
  *
  * Callback from the settings post function.
index 09a566e8b46b2071027cc85fe0cd678ac783b459..5555ec5accfe624d25303c3536d04955f15f6125 100644 (file)
@@ -16,13 +16,6 @@ function googlemaps_install()
        Logger::log("installed googlemaps");
 }
 
-function googlemaps_uninstall()
-{
-       Hook::unregister('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
-
-       Logger::log("removed googlemaps");
-}
-
 function googlemaps_location($a, &$item)
 {
 
index febb12938965b19ba39440ba11c172eabc8b4745..894abda6d748c7dace81010926f3084defce3036 100644 (file)
@@ -26,16 +26,6 @@ function gravatar_install() {
        Logger::log("registered gravatar in avatar_lookup hook");
 }
 
-/**
- * Removes the addon hook
- */
-function gravatar_uninstall() {
-       Hook::unregister('load_config',   'addon/gravatar/gravatar.php', 'gravatar_load_config');
-       Hook::unregister('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
-
-       Logger::log("unregistered gravatar in avatar_lookup hook");
-}
-
 function gravatar_load_config(App $a, ConfigFileLoader $loader)
 {
        $a->getConfigCache()->load($loader->loadAddonConfig('gravatar'));
index 06b3f6151d79e3b74de024650bafddbded4248d6..e0e61ee54fb9e3385cefd83f4738d3ded8db4787 100644 (file)
@@ -17,18 +17,6 @@ function group_text_install() {
        Logger::log("installed group_text");
 }
 
-
-function group_text_uninstall() {
-
-       Hook::unregister('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
-       Hook::unregister('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
-
-
-       Logger::log("removed group_text");
-}
-
-
-
 /**
  *
  * Callback from the settings post function.
index 823541bb458aee6d3546f7f619168a607436ab0f..c46c26aed7bef7f628d198f940542aa94f2396de 100644 (file)
@@ -16,12 +16,6 @@ function highlightjs_install()
        Hook::register('footer', __FILE__, 'highlightjs_footer');
 }
 
-function highlightjs_uninstall()
-{
-       Hook::unregister('head'  , __FILE__, 'highlightjs_head');
-       Hook::unregister('footer', __FILE__, 'highlightjs_footer');
-}
-
 function highlightjs_head(App $a, &$b)
 {
        if ($a->getCurrentTheme() == 'frio') {
index 6ecfc160a46452f6314cc97c29c49d488e3d8415..5021a63ed60cdd5482d7600e0505a27113bc2254 100644 (file)
@@ -23,12 +23,6 @@ function ifttt_install()
        Hook::register('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
 }
 
-function ifttt_uninstall()
-{
-       Hook::unregister('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
-       Hook::unregister('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
-}
-
 function ifttt_module()
 {
 
index 0619c288a78077a5202c658b21ac7a84c05e0410..15f2b41e63e55bf9ff70c3bbfcb7423cf3e9c883 100644 (file)
@@ -25,15 +25,6 @@ function ijpost_install()
        Hook::register('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
 }
 
-function ijpost_uninstall()
-{
-       Hook::unregister('post_local',       'addon/ijpost/ijpost.php', 'ijpost_post_local');
-       Hook::unregister('notifier_normal',  'addon/ijpost/ijpost.php', 'ijpost_send');
-       Hook::unregister('jot_networks',     'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
-       Hook::unregister('connector_settings',      'addon/ijpost/ijpost.php', 'ijpost_settings');
-       Hook::unregister('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
-}
-
 function ijpost_jot_nets(\Friendica\App &$a, array &$jotnets_fields)
 {
        if (!local_user()) {
index 0152189efbe330761525afee956b4d6cadf1559f..4bbb419babf37961a4f1ea589ac62f25bb0f549e 100644 (file)
@@ -23,13 +23,6 @@ function impressum_install() {
     Logger::log("installed impressum Addon");
 }
 
-function impressum_uninstall() {
-       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");
-}
-
 function impressum_module() {
 }
 function impressum_content() {
index 126ea832d6e26c0637955f1a12035bea012f36ad..a499826451a1d265f30cd404e493d1f3cde87574 100644 (file)
@@ -13,11 +13,6 @@ function infiniteimprobabilitydrive_install()
        Hook::register('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
 }
 
-function infiniteimprobabilitydrive_uninstall()
-{
-       Hook::unregister('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
-}
-
 function infiniteimprobabilitydrive_app_menu($a, &$b)
 {
        $b['app_menu'][] = '<div class="app-title"><a href="infiniteimprobabilitydrive">' . DI::l10n()->t('Infinite Improbability Drive') . '</a></div>';
index 6dccd4846209dfee0f085249d3e520bc0a739a5d..b5ba5172d7fcc4d530ea6f10ddda02d483293acc 100644 (file)
@@ -17,13 +17,6 @@ function irc_install() {
        Hook::register('addon_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
 }
 
-function irc_uninstall() {
-       Hook::unregister('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
-       Hook::unregister('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
-
-}
-
-
 function irc_addon_settings(&$a,&$s) {
        if(! local_user())
                return;
index 077e2b9564c7520ae27b0e6c94da948cc301f594..0333d8ecf79dee33e0f0a7960cb51e35c13d8820 100644 (file)
@@ -104,19 +104,6 @@ function jappixmini_install()
        }
 }
 
-function jappixmini_uninstall()
-{
-       Hook::unregister('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
-       Hook::unregister('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
-
-       Hook::unregister('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
-       Hook::unregister('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
-
-       Hook::unregister('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
-
-       Hook::unregister('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
-}
-
 function jappixmini_addon_admin(App $a, &$o)
 {
        // display instructions and warnings on addon settings page for admin
index fe25fdf75ce743e43c9cd39349aab6b97d723c5a..88aa84ea206cbbfb439810f7c461e78e945e1927 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: Dragonlance Krynn locales
- * Description: Set a random locale from the Dragonlance Realm of Krynn when posting. Based on the planets frindica addon by Mike Macgirvin and Tony Baldwin
+ * Description: Set a random locale from the Dragonlance Realm of Krynn when posting. Based on the planets friendica addon by Mike Macgirvin and Tony Baldwin
  * Version: 1.0
  * Planets Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  * Planets Author: Tony Baldwin <https://free-haven.org/profile/tony>
@@ -38,27 +38,6 @@ function krynn_install() {
        Logger::log("installed krynn");
 }
 
-
-function krynn_uninstall() {
-
-       /**
-        *
-        * uninstall unregisters any hooks created with register_hook
-        * during install. It may also delete configuration settings
-        * and any other cleanup.
-        *
-        */
-
-       Hook::unregister('post_local',    'addon/krynn/krynn.php', 'krynn_post_hook');
-       Hook::unregister('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
-       Hook::unregister('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
-
-
-       Logger::log("removed krynn");
-}
-
-
-
 function krynn_post_hook($a, &$item) {
 
        /**
@@ -70,8 +49,6 @@ function krynn_post_hook($a, &$item) {
         *
         */
 
-       Logger::log('krynn invoked');
-
        if(! local_user())   /* non-zero if this is a logged in user of this system */
                return;
 
index f4884d19fb6e93281912720db7166305ba5d42b9..954884219982864ce0055fce134a156871300411 100644 (file)
@@ -25,14 +25,6 @@ function langfilter_install()
        Hook::register('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
 }
 
-function langfilter_uninstall()
-{
-       Hook::unregister('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter');
-       Hook::unregister('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
-       Hook::unregister('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
-       Hook::unregister('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
-}
-
 /* The settings
  * 1st check if somebody logged in is calling
  * 2nd get the current settings
index 6110799653b8fa8f029bb22067a37a2888529971..f99f6eeee88daab5b5d96e1a2716c85a4803e05c 100644 (file)
@@ -66,12 +66,6 @@ function ldapauth_install()
        Hook::register('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
 }
 
-function ldapauth_uninstall()
-{
-       Hook::unregister('load_config',  'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
-       Hook::unregister('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
-}
-
 function ldapauth_load_config(\Friendica\App $a, ConfigFileLoader $loader)
 {
        $a->getConfigCache()->load($loader->loadAddonConfig('ldapauth'));
index eb25f550b554695cdc875a8155dbef9e98260426..04bbd47417a2c7dccc90c9fe3911d45bd420ecb2 100644 (file)
@@ -16,13 +16,6 @@ function leistungsschutzrecht_install() {
        Hook::register('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
 }
 
-
-function leistungsschutzrecht_uninstall() {
-       Hook::unregister('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
-       Hook::unregister('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
-       Hook::unregister('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
-}
-
 function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) {
        if (!isset($siteinfo["url"]) || empty($siteinfo['type'])) {
                return;
index dfa4922358adb235e54dc51d8b66f89da67c396a..1062ab5a126c61d22c3df96d0b240e107baa5137 100644 (file)
@@ -23,16 +23,6 @@ function libertree_install()
        Hook::register('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
 }
 
-function libertree_uninstall()
-{
-       Hook::unregister('hook_fork',        'addon/libertree/libertree.php', 'libertree_hook_fork');
-       Hook::unregister('post_local',       'addon/libertree/libertree.php', 'libertree_post_local');
-       Hook::unregister('notifier_normal',  'addon/libertree/libertree.php', 'libertree_send');
-       Hook::unregister('jot_networks',     'addon/libertree/libertree.php', 'libertree_jot_nets');
-       Hook::unregister('connector_settings',      'addon/libertree/libertree.php', 'libertree_settings');
-       Hook::unregister('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
-}
-
 function libertree_jot_nets(App &$a, array &$jotnets_fields)
 {
     if(! local_user()) {
index 1c4f0e903316c289113155e9357954cb0fc4815d..9a0c9db6fb2e8eaef4a34ac95c79ceae0e8260f7 100644 (file)
@@ -26,16 +26,6 @@ function libravatar_install()
        Logger::log("registered libravatar in avatar_lookup hook");
 }
 
-/**
- * Removes the addon hook
- */
-function libravatar_uninstall()
-{
-       Hook::unregister('load_config',   'addon/libravatar/libravatar.php', 'libravatar_load_config');
-       Hook::unregister('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
-       Logger::log("unregistered libravatar in avatar_lookup hook");
-}
-
 function libravatar_load_config(App $a, ConfigFileLoader $loader)
 {
        $a->getConfigCache()->load($loader->loadAddonConfig('libravatar'));
index a98087c2dbc6c7744e40ed5d22b9da46a32101ef..0d06100866723099109ca1e7b6253ded0c16b80e 100644 (file)
@@ -24,15 +24,6 @@ function ljpost_install() {
     Hook::register('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
 
 }
-function ljpost_uninstall() {
-    Hook::unregister('post_local',       'addon/ljpost/ljpost.php', 'ljpost_post_local');
-    Hook::unregister('notifier_normal',  'addon/ljpost/ljpost.php', 'ljpost_send');
-    Hook::unregister('jot_networks',     'addon/ljpost/ljpost.php', 'ljpost_jot_nets');
-    Hook::unregister('connector_settings',      'addon/ljpost/ljpost.php', 'ljpost_settings');
-    Hook::unregister('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post');
-
-}
-
 
 function ljpost_jot_nets(\Friendica\App &$a, array &$jotnets_fields)
 {
index 502c92d98a6f80f948485d917d5cfd5f6a090c4e..7bc0adc98d61fcf734194b7d26e523e05803b9b2 100644 (file)
@@ -12,11 +12,6 @@ function mahjongg_install() {
     Hook::register('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
 }
 
-function mahjongg_uninstall() {
-    Hook::unregister('app_menu', 'addon/mahjongg/mahjongg.php', 'mahjongg_app_menu');
-
-}
-
 function mahjongg_app_menu($a,&$b) {
     $b['app_menu'][] = '<div class="app-title"><a href="mahjongg">Mahjongg</a></div>';
 }
index d09f913a16321387a2f30da21b13f07c710e0c7a..23aed60f9c362db6bf894ed337b9f1937a2d2e97 100644 (file)
@@ -56,19 +56,6 @@ function mailstream_install() {
        }
 }
 
-function mailstream_uninstall() {
-       Hook::unregister('addon_settings', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings');
-       Hook::unregister('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post');
-       Hook::unregister('post_local', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
-       Hook::unregister('post_remote', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
-       Hook::unregister('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_local_hook');
-       Hook::unregister('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_remote_hook');
-       Hook::unregister('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
-       Hook::unregister('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook');
-       Hook::unregister('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron');
-       Hook::unregister('incoming_mail', 'addon/mailstream/mailstream.php', 'mailstream_incoming_mail');
-}
-
 function mailstream_module() {}
 
 function mailstream_addon_admin(&$a,&$o) {
index a3cd0b97aa817b69cb7fa01cf14fd7b0b26024ef..eeada86256dd361267f359812252d7ecfb721f0e 100644 (file)
@@ -27,16 +27,6 @@ function mastodoncustomemojis_install()
        Hook::register('contacts_mod_init',  __FILE__, 'mastodoncustomemojis_css_hook');
 }
 
-function mastodoncustomemojis_uninstall()
-{
-       Hook::unregister('put_item_in_cache',  __FILE__, 'mastodoncustomemojis_put_item_in_cache');
-       Hook::unregister('network_mod_init',   __FILE__, 'mastodoncustomemojis_css_hook');
-       Hook::unregister('display_mod_init',   __FILE__, 'mastodoncustomemojis_css_hook');
-       Hook::unregister('search_mod_init',    __FILE__, 'mastodoncustomemojis_css_hook');
-       Hook::unregister('community_mod_init', __FILE__, 'mastodoncustomemojis_css_hook');
-       Hook::unregister('contacts_mod_init',  __FILE__, 'mastodoncustomemojis_css_hook');
-}
-
 function mastodoncustomemojis_css_hook(App $a)
 {
        DI::page()['htmlhead'] .= <<<HTML
index 3cc42c47f5da64cc33065395ca682307249a2767..9734457d616b11e4888d41c21b5fa0bee6df17d0 100644 (file)
@@ -20,18 +20,6 @@ function mathjax_install()
        Hook::register('addon_settings_post', __FILE__, 'mathjax_settings_post');
 }
 
-function mathjax_uninstall()
-{
-       Hook::unregister('footer'             , __FILE__, 'mathjax_footer');
-       Hook::unregister('addon_settings'     , __FILE__, 'mathjax_settings');
-       Hook::unregister('addon_settings_post', __FILE__, 'mathjax_settings_post');
-
-       // Legacy hooks
-       Hook::unregister('load_config'        , __FILE__, 'mathjax_load_config');
-       Hook::unregister('page_header'        , __FILE__, 'mathjax_page_header');
-       Hook::unregister('template_vars'      , __FILE__, 'mathjax_template_vars');
-}
-
 function mathjax_settings_post($a)
 {
        if (!local_user() || empty($_POST['mathjax-submit'])) {
index 6e96e904fb212296949e2a35d5f33e1ec13f404f..635a0158dddd4ea12a7ef5450eeb26b976c980f8 100644 (file)
@@ -16,11 +16,6 @@ function membersince_install()
        Hook::register('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
 }
 
-function membersince_uninstall()
-{
-       Hook::unregister('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display');
-}
-
 function membersince_display(Friendica\App $a, &$b)
 {
        if ($a->getCurrentTheme() == 'frio') {
index 1505176e49c7c120671c4b2a0d5475ae067cccbe..2491aa80605d55888b7396d11668904a79ac190e 100644 (file)
@@ -18,18 +18,6 @@ function morechoice_install() {
        Hook::register('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
 }
 
-
-function morechoice_uninstall() {
-
-       Hook::unregister('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
-       Hook::unregister('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
-       Hook::unregister('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
-
-// We need to leave this here for a while, because we now have a situation where people can end up with an orphaned hook.
-       Hook::unregister('poke_verbs', 'addon/morechoice/morechoice.php', 'morechoice_poke_verbs');
-
-}
-
 function morechoice_gender_selector($a,&$b) {
        $b['Androgyne'] = DI::l10n()->t('Androgyne');
        $b['Bear'] = DI::l10n()->t('Bear');
index f943a8f472c1941df9433439eb7b3e0c8522515a..4e7e7cfe9a9c371aef08a0047172aa4660a34194 100644 (file)
@@ -14,11 +14,6 @@ function morepokes_install()
          Hook::register('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
 }
 
-function morepokes_uninstall()
-{
-         Hook::unregister('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
-}
-
 function morepokes_poke_verbs($a, &$b)
 {
        $b['bitchslap'] = ['bitchslapped', DI::l10n()->t('bitchslap'), DI::l10n()->t('bitchslapped')];
index 7e314e8916352035d41bca3b3f75081871d6a43e..52a48c5f9a05c38fecdc7a94654e11c1fe7488fa 100644 (file)
@@ -14,11 +14,6 @@ function namethingy_install() {
     Hook::register('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
 }
 
-function namethingy_uninstall() {
-    Hook::unregister('app_menu', 'addon/namethingy/namethingy.php', 'namethingy_app_menu');
-
-}
-
 function namethingy_app_menu($a,&$b) {
     $b['app_menu'][] = '<div class="app-title"><a href="namethingy">NameThingy</a></div>';
 }
index 585568135b2eba6a0ed0af73c07ebb36b82f5647..d748816e02b5fdd8aec05a17bc9e551af8e3a7d4 100644 (file)
@@ -19,11 +19,6 @@ function newmemberwidget_install()
        Logger::log('newmemberwidget installed');
 }
 
-function newmemberwidget_uninstall()
-{
-       Hook::unregister( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init');
-}
-
 function newmemberwidget_network_mod_init ($a, $b)
 {
        if (empty($_SESSION['new_member'])) {
index 7b23255388f6ea0be58a0110cf87d44151d7e54e..e5e94c7ec7e68786d9efe00926d52d0021bc48bd 100644 (file)
@@ -15,16 +15,6 @@ use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
 use Friendica\DI;
 
-function notifyall_install()
-{
-       Logger::log("installed notifyall");
-}
-
-function notifyall_uninstall()
-{
-       Logger::log("removed notifyall");
-}
-
 function notifyall_module() {}
 
 function notifyall_addon_admin(App $a, &$o)
index e5ff8918ddbe2bef9b4b6f0db0842f8624dc942e..b99501c3a3b3876f7fb9f11ab86e57828ccb9fd0 100644 (file)
@@ -16,12 +16,6 @@ function notimeline_install()
        Hook::register('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
 }
 
-function notimeline_uninstall()
-{
-       Hook::unregister('addon_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings');
-       Hook::unregister('addon_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post');
-}
-
 function notimeline_settings_post($a, $post)
 {
        if (!local_user() || empty($_POST['notimeline-submit'])) {
index 65b26f596fdb91fe44c486811d5d7325c6dad6ea..9f81b29d8333557f669a26dc735a9a23c711616b 100644 (file)
@@ -17,14 +17,6 @@ function nsfw_install()
        Hook::register('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
 }
 
-function nsfw_uninstall()
-{
-       Hook::unregister('prepare_body_content_filter', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body_content_filter');
-       Hook::unregister('prepare_body', 'addon/nsfw/nsfw.php', 'nsfw_prepare_body');
-       Hook::unregister('addon_settings', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings');
-       Hook::unregister('addon_settings_post', 'addon/nsfw/nsfw.php', 'nsfw_addon_settings_post');
-}
-
 // This function isn't perfect and isn't trying to preserve the html structure - it's just a
 // quick and dirty filter to pull out embedded photo blobs because 'nsfw' seems to come up
 // inside them quite often. We don't need anything fancy, just pull out the data blob so we can
index 6ee3956ba9f18d01b8539acfaa02e6997a1cd7bf..f12badeb40a5cd4f4811256c8c494c8b5343734a 100644 (file)
@@ -17,16 +17,6 @@ function numfriends_install() {
        Logger::log("installed numfriends");
 }
 
-
-function numfriends_uninstall() {
-
-       Hook::unregister('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings');
-       Hook::unregister('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post');
-
-
-       Logger::log("removed numfriends");
-}
-
 /**
  *
  * Callback from the settings post function.
index 05a284e68f816b8fc210dc7ec44532034a43cf35..168d3d2ff4bb71b5dc507d9045cad2f32ab256ac 100644 (file)
@@ -34,18 +34,6 @@ function openstreetmap_install()
        Logger::log("installed openstreetmap");
 }
 
-function openstreetmap_uninstall()
-{
-       Hook::unregister('load_config',     'addon/openstreetmap/openstreetmap.php', 'openstreetmap_load_config');
-       Hook::unregister('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
-       Hook::unregister('generate_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_map');
-       Hook::unregister('generate_named_map', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_generate_named_map');
-       Hook::unregister('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates');
-       Hook::unregister('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
-
-       Logger::log("removed openstreetmap");
-}
-
 function openstreetmap_load_config(\Friendica\App $a, ConfigFileLoader $loader)
 {
        $a->getConfigCache()->load($loader->loadAddonConfig('openstreetmap'));
index 94f78bb4628f30e037065b745644ebd13ff47a10..d461cfd4fdade81aa494f4d4b3306fa4f1ba88c4 100644 (file)
@@ -45,13 +45,6 @@ function piwik_install() {
        Logger::log("installed piwik addon");
 }
 
-function piwik_uninstall() {
-       Hook::unregister('load_config', 'addon/piwik/piwik.php', 'piwik_load_config');
-       Hook::unregister('page_end', 'addon/piwik/piwik.php', 'piwik_analytics');
-
-       Logger::log("uninstalled piwik addon");
-}
-
 function piwik_load_config(\Friendica\App $a, ConfigFileLoader $loader)
 {
        $a->getConfigCache()->load($loader->loadAddonConfig('piwik'));
index ea543f4097fa77f0160928a61a45f70b396d6ef3..9fed41862ab45010f3b6e5dc46d2693ba70d5d07 100644 (file)
@@ -35,27 +35,6 @@ function planets_install() {
        Logger::log("installed planets");
 }
 
-
-function planets_uninstall() {
-
-       /**
-        *
-        * uninstall unregisters any hooks created with register_hook
-        * during install. It may also delete configuration settings
-        * and any other cleanup.
-        *
-        */
-
-       Hook::unregister('post_local',    'addon/planets/planets.php', 'planets_post_hook');
-       Hook::unregister('addon_settings', 'addon/planets/planets.php', 'planets_settings');
-       Hook::unregister('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post');
-
-
-       Logger::log("removed planets");
-}
-
-
-
 function planets_post_hook($a, &$item) {
 
        /**
index f52703dfec087fc8d1831f284e9dec57cfa93320..549020bd20aca88d622582840a5a4987aa3adf51 100644 (file)
@@ -27,15 +27,6 @@ function public_server_install()
        Hook::register('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
 }
 
-function public_server_uninstall()
-{
-       Hook::unregister('load_config',      'addon/public_server/public_server.php', 'public_server_load_config');
-       Hook::unregister('register_account', 'addon/public_server/public_server.php', 'public_server_register_account');
-       Hook::unregister('cron', 'addon/public_server/public_server.php', 'public_server_cron');
-       Hook::unregister('enotify', 'addon/public_server/public_server.php', 'public_server_enotify');
-       Hook::unregister('logged_in', 'addon/public_server/public_server.php', 'public_server_login');
-}
-
 function public_server_load_config(App $a, ConfigFileLoader $loader)
 {
        $a->getConfigCache()->load($loader->loadAddonConfig('public_server'));
index 6b61a5946438cb1794f9b66ec4e86dd387c7df63..2e2ca98cb26ec9313b9d008b4e023b908d6a1eb5 100644 (file)
@@ -45,19 +45,6 @@ function pumpio_install()
        Hook::register('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
 }
 
-function pumpio_uninstall()
-{
-       Hook::unregister('load_config',      'addon/pumpio/pumpio.php', 'pumpio_load_config');
-       Hook::unregister('hook_fork',        'addon/pumpio/pumpio.php', 'pumpio_hook_fork');
-       Hook::unregister('post_local',       'addon/pumpio/pumpio.php', 'pumpio_post_local');
-       Hook::unregister('notifier_normal',  'addon/pumpio/pumpio.php', 'pumpio_send');
-       Hook::unregister('jot_networks',     'addon/pumpio/pumpio.php', 'pumpio_jot_nets');
-       Hook::unregister('connector_settings',      'addon/pumpio/pumpio.php', 'pumpio_settings');
-       Hook::unregister('connector_settings_post', 'addon/pumpio/pumpio.php', 'pumpio_settings_post');
-       Hook::unregister('cron', 'addon/pumpio/pumpio.php', 'pumpio_cron');
-       Hook::unregister('check_item_notification', 'addon/pumpio/pumpio.php', 'pumpio_check_item_notification');
-}
-
 function pumpio_module() {}
 
 function pumpio_content(App $a)
index 45f9d972af51d0eca85dcc0db9aa6b7d109fbaf8..4c78b82244afff287f3e9c392dcdfc024850e57c 100644 (file)
@@ -27,12 +27,6 @@ function qcomment_install() {
 
 }
 
-function qcomment_uninstall() {
-       Hook::unregister('addon_settings', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings');
-       Hook::unregister('addon_settings_post', 'addon/qcomment/qcomment.php', 'qcomment_addon_settings_post');
-
-}
-
 function qcomment_addon_settings(&$a, &$s)
 {
        if (! local_user()) {
index 886d79d125a58f240d63404ddcee5521367a3daf..3576fef85c17aceb3b419eac1cd3fe97e0c210fc 100644 (file)
@@ -52,17 +52,12 @@ function randplace_uninstall() {
 
        /**
         *
-        * uninstall unregisters any hooks created with register_hook
-        * during install. It may also delete configuration settings
-        * and any other cleanup.
+        * This function should undo anything that was done in name_install()
+        *
+        * Except hooks, they are all unregistered automatically and don't need to be unregistered manually.
         *
         */
 
-       Hook::unregister('post_local',    'addon/randplace/randplace.php', 'randplace_post_hook');
-       Hook::unregister('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings');
-       Hook::unregister('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
-
-
        Logger::log("removed randplace");
 }
 
index 159e3cf941ebf82fd19ac342107ad8ac66c5ba4b..6fe75f1696983ab908dea5a439195d9f98c3d2e3 100644 (file)
@@ -19,12 +19,6 @@ function remote_permissions_install() {
        Hook::register('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
 }
 
-function remote_permissions_uninstall() {
-       Hook::unregister('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
-       Hook::unregister('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
-       Hook::unregister('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
-}
-
 function remote_permissions_settings(&$a,&$o) {
 
        if(! local_user())
index c44d0a3057c8ce6139aa2771e3493f5704424a11..acc6521a5468c20c1fd9a5c08d1369e40a6f3f22 100644 (file)
@@ -14,12 +14,6 @@ function rendertime_install() {
        Hook::register('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
 }
 
-
-function rendertime_uninstall() {
-       Hook::unregister('init_1', 'addon/rendertime/rendertime.php', 'rendertime_init_1');
-       Hook::unregister('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
-}
-
 function rendertime_init_1(&$a) {
 }
 
index e0780614a1f2eb05870719a7bba420528595072c..fb801a4ce84bc8f03e88aab4d7fe438908631f12 100644 (file)
@@ -26,16 +26,6 @@ function securemail_install()
        Logger::log('installed securemail');
 }
 
-function securemail_uninstall()
-{
-       Hook::unregister('addon_settings', 'addon/securemail/securemail.php', 'securemail_settings');
-       Hook::unregister('addon_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
-
-       Hook::unregister('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
-
-       Logger::log('removed securemail');
-}
-
 /**
  * @brief Build user settings form
  *
index d8eccfddf48591f7b4179afaa4e61b248a04399d..7583fd33dfd9bb4cbb0e8ed1afcc9b9a65baa125 100644 (file)
@@ -18,13 +18,6 @@ function showmore_install()
        Hook::register('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
 }
 
-function showmore_uninstall()
-{
-       Hook::unregister('prepare_body', 'addon/showmore/showmore.php', 'showmore_prepare_body');
-       Hook::unregister('addon_settings', 'addon/showmore/showmore.php', 'showmore_addon_settings');
-       Hook::unregister('addon_settings_post', 'addon/showmore/showmore.php', 'showmore_addon_settings_post');
-}
-
 function showmore_addon_settings(&$a, &$s)
 {
        if (!local_user()) {
index 892b4a70b445f8455f392f2f77bd45dedf370369..329b7282a280993a6ded4f85938b4bd4086451d6 100644 (file)
@@ -13,12 +13,6 @@ function smiley_pack_es_install() {
        Hook::register('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies_es');
 }
 
-function smiley_pack_es_uninstall() {
-       Hook::unregister('smilie', 'addon/smiley_pack_es/smiley_pack_es.php', 'smiley_pack_smilies');
-}
-
-
 function smiley_pack_smilies_es(&$a,&$b) {
 
 #Smileys are split into various directories by the intended range of emotions.  This is in case we get too big and need to modularise things.  We can then cut and paste the right lines, move the right directory, and just change the name of the addon to happy_smilies or whatever.
index 7472bd1cb77110803fcba7ac6dd7def8117e557b..bcefa7c3f231a86b7153cec5e78be6c107e21888 100644 (file)
@@ -15,12 +15,6 @@ function smiley_pack_fr_install() {
        Hook::register('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
 }
 
-function smiley_pack_fr_uninstall() {
-       Hook::unregister('smilie', 'addon/smiley_pack_fr/smiley_pack_fr.php', 'smiley_pack_fr_smilies');
-}
-
-
 function smiley_pack_fr_smilies(&$a,&$b) {
 
 #Smileys are split into various directories by the intended range of emotions.  This is in case we get too big and need to modularise things.  We can then cut and paste the right lines, move the right directory, and just change the name of the addon to happy_smilies or whatever.
index a80ab717c7cb0f08431801bb5a8de4e0121a8eed..6562e29bf534ca437f66a14731887cbe05f38890 100644 (file)
@@ -14,12 +14,6 @@ function smiley_pack_install() {
        Hook::register('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
 }
 
-function smiley_pack_uninstall() {
-       Hook::unregister('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies');
-}
-
-
 function smiley_pack_smilies(&$a,&$b) {
 
 #Smileys are split into various directories by the intended range of emotions.  This is in case we get too big and need to modularise things.  We can then cut and paste the right lines, move the right directory, and just change the name of the addon to happy_smilies or whatever.
index 9d4916372d3508d024ec2854b978e39c3c170d0f..fc42077369fbf4e0c1e5b605ae90fbd1ef9fdede 100644 (file)
@@ -16,16 +16,6 @@ function smileybutton_install() {
        Logger::log("installed smileybutton");
 }
 
-
-function smileybutton_uninstall() {
-       //Delet registered hooks
-       Hook::unregister('jot_tool',    'addon/smileybutton/smileybutton.php', 'show_button');
-
-       Logger::log("removed smileybutton");
-}
-
-
-
 function show_button(Friendica\App $a, &$b) {
        // Disable if theme is quattro
        // TODO add style for quattro
index 84bb24cf53c67817db44e3a4afd0d4e4687ee623..b55a0a2feb768594dd8fefcec04bf63bb8f4b74d 100644 (file)
@@ -15,12 +15,6 @@ function smilies_adult_install() {
        Hook::register('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
 }
 
-function smilies_adult_uninstall() {
-       Hook::unregister('smilie', 'addon/smilies_adult/smilies_adult.php', 'smilies_adult_smilies');
-}
-
-
 function smilies_adult_smilies(&$a,&$b) {
 
        $b['texts'][] = '(o)(o)';
index 97d26b7b90b29e537292815781f1a47964af4ebe..31c97a843cbf0ad5690454c62791da05870dfa27 100644 (file)
@@ -16,11 +16,6 @@ function sniper_install() {
     Hook::register('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
 }
 
-function sniper_uninstall() {
-    Hook::unregister('app_menu', 'addon/sniper/sniper.php', 'sniper_app_menu');
-
-}
-
 function sniper_app_menu($a,&$b) {
     $b['app_menu'][] = '<div class="app-title"><a href="sniper">Hot Shot Sniper</a></div>';
 }
index 9192b5a8e067652a747bd022437e8cdf568a46cc..8cdf444f1c206012dab7db900dfabed8a63ac840 100644 (file)
@@ -15,13 +15,6 @@ function startpage_install() {
        Hook::register('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
 }
 
-function startpage_uninstall()
-{
-       Hook::unregister('home_init', 'addon/startpage/startpage.php', 'startpage_home_init');
-       Hook::unregister('addon_settings', 'addon/startpage/startpage.php', 'startpage_settings');
-       Hook::unregister('addon_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post');
-}
-
 function startpage_home_init($a, $b)
 {
        if (!local_user()) {
index 7708e3f4e2d6cdebec1514b0091068d8e74ce58d..0ab711cad3dac4ec41c71a9d31a2e7ac9514f95c 100644 (file)
@@ -74,24 +74,6 @@ function statusnet_install()
        Logger::log("installed GNU Social");
 }
 
-function statusnet_uninstall()
-{
-       Hook::unregister('connector_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
-       Hook::unregister('connector_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
-       Hook::unregister('notifier_normal', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
-       Hook::unregister('hook_fork', 'addon/statusnet/statusnet.php', 'statusnet_hook_fork');
-       Hook::unregister('post_local', 'addon/statusnet/statusnet.php', 'statusnet_post_local');
-       Hook::unregister('jot_networks', 'addon/statusnet/statusnet.php', 'statusnet_jot_nets');
-       Hook::unregister('cron', 'addon/statusnet/statusnet.php', 'statusnet_cron');
-       Hook::unregister('prepare_body', 'addon/statusnet/statusnet.php', 'statusnet_prepare_body');
-       Hook::unregister('check_item_notification', 'addon/statusnet/statusnet.php', 'statusnet_check_item_notification');
-
-       // old setting - remove only
-       Hook::unregister('post_local_end', 'addon/statusnet/statusnet.php', 'statusnet_post_hook');
-       Hook::unregister('addon_settings', 'addon/statusnet/statusnet.php', 'statusnet_settings');
-       Hook::unregister('addon_settings_post', 'addon/statusnet/statusnet.php', 'statusnet_settings_post');
-}
-
 function statusnet_check_item_notification(App $a, &$notification_data)
 {
        if (DI::pConfig()->get($notification_data["uid"], 'statusnet', 'post')) {
index 9ba9c6d245f2196f61fbfdd1460c13acbc0d6381..ad2e8c14e0c5e4e269ef494df4704ae597001ad6 100644 (file)
@@ -19,15 +19,6 @@ function superblock_install()
        Hook::register('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
 }
 
-function superblock_uninstall()
-{
-       Hook::unregister('addon_settings', 'addon/superblock/superblock.php', 'superblock_addon_settings');
-       Hook::unregister('addon_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
-       Hook::unregister('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
-       Hook::unregister('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
-       Hook::unregister('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
-}
-
 function superblock_addon_settings(&$a, &$s)
 {
        if (!local_user()) {
index cb95babfcb0402f792da59451d80e5d63e887bea..1806ea2cc528ada368e123a9b8827b8965535632 100644 (file)
@@ -26,17 +26,6 @@ function testdrive_install() {
 
 }
 
-
-function testdrive_uninstall() {
-
-       Hook::unregister('load_config',      'addon/testdrive/testdrive.php', 'testdrive_load_config');
-       Hook::unregister('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
-       Hook::unregister('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
-       Hook::unregister('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
-       Hook::unregister('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update');
-
-}
-
 function testdrive_load_config(App $a, ConfigFileLoader $loader)
 {
        $a->getConfigCache()->load($loader->loadAddonConfig('testdrive'));
index 08a8c09c7bc1b975688e083924881d6032d34bbb..47c9e806e490e302a94d26e862daa1d2c6fc44f1 100644 (file)
@@ -12,11 +12,6 @@ function tictac_install() {
        Hook::register('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
 }
 
-function tictac_uninstall() {
-       Hook::unregister('app_menu', 'addon/tictac/tictac.php', 'tictac_app_menu');
-
-}
-
 function tictac_app_menu($a,&$b) {
        $b['app_menu'][] = '<div class="app-title"><a href="tictac">' . DI::l10n()->t('Three Dimensional Tic-Tac-Toe') . '</a></div>';
 }
index 23127980e0dd1d65820efbd354d6b09c0e8443ee..4504534cbdc737fff9c7a0215513426b07d45ccf 100644 (file)
@@ -29,16 +29,6 @@ function tumblr_install()
        Hook::register('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
 }
 
-function tumblr_uninstall()
-{
-       Hook::unregister('hook_fork',               'addon/tumblr/tumblr.php', 'tumblr_hook_fork');
-       Hook::unregister('post_local',              'addon/tumblr/tumblr.php', 'tumblr_post_local');
-       Hook::unregister('notifier_normal',         'addon/tumblr/tumblr.php', 'tumblr_send');
-       Hook::unregister('jot_networks',            'addon/tumblr/tumblr.php', 'tumblr_jot_nets');
-       Hook::unregister('connector_settings',      'addon/tumblr/tumblr.php', 'tumblr_settings');
-       Hook::unregister('connector_settings_post', 'addon/tumblr/tumblr.php', 'tumblr_settings_post');
-}
-
 function tumblr_module()
 {
 }
index af286276e14ea23bf5ecd866c7e143a6953ce42c..ef7bb6150712e941465687f59b181a90915f53ba 100644 (file)
@@ -13,10 +13,6 @@ function unicode_smilies_install() {
        Hook::register('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
 }
 
-function unicode_smilies_uninstall() {
-       Hook::unregister('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
-}
-
 function unicode_smilies_smilies(&$a,&$b) {
        Smilies::add($b, ':-)', '&#x1F600;');
        Smilies::add($b, ':)', '&#x1F600;');
index 10f883593af3ef2efa79a718733aad419e7f23a2..cbdf546177e79232bde772bc82d4158334861575 100644 (file)
@@ -16,13 +16,6 @@ function viewsrc_install() {
        Hook::register('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
 }
 
-
-function viewsrc_uninstall() {
-       Hook::unregister('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
-       Hook::unregister('page_end', 'addon/viewsrc/viewsrc.php', 'viewsrc_page_end');
-
-}
-
 function viewsrc_page_end(&$a, &$o){
        DI::page()['htmlhead'] .= <<< EOS
        <script>
index f2facf68bebb3ff8bc5f4c8e302ae70c1e5c9539..0dcc7c195eace34be679c1420eb887124eba34e9 100644 (file)
@@ -15,11 +15,6 @@ function webrtc_install() {
         Hook::register('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
 }
 
-function webrtc_uninstall() {
-        Hook::unregister('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
-
-}
-
 function webrtc_app_menu($a,&$b) {
        $b['app_menu'][] = '<div class="app-title"><a href="webrtc">' . DI::l10n()->t('WebRTC Videochat') . '</a></div>';
 }
index 2c7aabaea0339e080f447eca95046c0562dc656b..319a8a78d6f6c35335f4a12bc7a4e09b6c13dac9 100644 (file)
@@ -20,11 +20,6 @@ function widgets_install() {
        Logger::log("installed widgets");
 }
 
-function widgets_uninstall() {
-       Hook::unregister('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
-       Hook::unregister('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
-}
-
 function widgets_settings_post(){
        if(! local_user())
                return;
index 3c91a46d5738409095388eb191b9c6d0666b6c3c..908eeb31e6de037e3e632c5362a2cd6beed64367 100644 (file)
@@ -55,18 +55,6 @@ function windowsphonepush_install()
        Logger::log("installed windowsphonepush");
 }
 
-function windowsphonepush_uninstall()
-{
-       /* uninstall unregisters any hooks created with register_hook
-        * during install. Don't delete data in table `pconfig`.
-        */
-       Hook::unregister('cron', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_cron');
-       Hook::unregister('addon_settings', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings');
-       Hook::unregister('addon_settings_post', 'addon/windowsphonepush/windowsphonepush.php', 'windowsphonepush_settings_post');
-
-       Logger::log("removed windowsphonepush");
-}
-
 /* declare the windowsphonepush function so that /windowsphonepush url requests will land here */
 function windowsphonepush_module()
 {
index 8cd1341092dc461284b05d1c2af0bbb95d85a8a8..aac81967b7165baf2f1f1ce0e2d74cc105aef706 100644 (file)
@@ -25,22 +25,6 @@ function wppost_install()
        Hook::register('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
 }
 
-function wppost_uninstall()
-{
-       Hook::unregister('hook_fork',        'addon/wppost/wppost.php', 'wppost_hook_fork');
-       Hook::unregister('post_local',       'addon/wppost/wppost.php', 'wppost_post_local');
-       Hook::unregister('notifier_normal',  'addon/wppost/wppost.php', 'wppost_send');
-       Hook::unregister('jot_networks',     'addon/wppost/wppost.php', 'wppost_jot_nets');
-       Hook::unregister('connector_settings',      'addon/wppost/wppost.php', 'wppost_settings');
-       Hook::unregister('connector_settings_post', 'addon/wppost/wppost.php', 'wppost_settings_post');
-
-       // obsolete - remove
-       Hook::unregister('post_local_end',   'addon/wppost/wppost.php', 'wppost_send');
-       Hook::unregister('addon_settings',  'addon/wppost/wppost.php', 'wppost_settings');
-       Hook::unregister('addon_settings_post',  'addon/wppost/wppost.php', 'wppost_settings_post');
-}
-
-
 function wppost_jot_nets(\Friendica\App &$a, array &$jotnets_fields)
 {
        if (!local_user()) {
index 67ce1e005ea7c7272a5854405ba795251bc9373d..81adec8486b0848f74b7a3fa208c998e6d55ddcc 100644 (file)
@@ -21,14 +21,6 @@ function xmpp_install()
        Hook::register('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
 }
 
-function xmpp_uninstall()
-{
-       Hook::unregister('addon_settings', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings');
-       Hook::unregister('addon_settings_post', 'addon/xmpp/xmpp.php', 'xmpp_addon_settings_post');
-       Hook::unregister('page_end', 'addon/xmpp/xmpp.php', 'xmpp_script');
-       Hook::unregister('logged_in', 'addon/xmpp/xmpp.php', 'xmpp_login');
-}
-
 function xmpp_addon_settings_post()
 {
        if (!local_user() || empty($_POST['xmpp-settings-submit'])) {