Browse Source

[various] Remove redundant uninstall functions

- All hooks (current and obsolete) are removed automatically during addon uninstall
pull/1009/head
Hypolite Petovan 10 months ago
parent
commit
203672cf27
77 changed files with 229 additions and 887 deletions
  1. +0
    -7
      advancedcontentfilter/advancedcontentfilter.php
  2. +0
    -3
      blackout/blackout.php
  3. +0
    -5
      blockbot/blockbot.php
  4. +0
    -12
      blockem/blockem.php
  5. +0
    -16
      blogger/blogger.php
  6. +0
    -10
      buffer/buffer.php
  7. +0
    -5
      buglink/buglink.php
  8. +0
    -5
      calc/calc.php
  9. +0
    -12
      catavatar/catavatar.php
  10. +225
    -229
      convert/convert.php
  11. +0
    -7
      curweather/curweather.php
  12. +0
    -10
      diaspora/diaspora.php
  13. +0
    -9
      dwpost/dwpost.php
  14. +0
    -5
      forumdirectory/forumdirectory.php
  15. +0
    -9
      fromapp/fromapp.php
  16. +0
    -7
      geocoordinates/geocoordinates.php
  17. +0
    -13
      gnot/gnot.php
  18. +0
    -7
      googlemaps/googlemaps.php
  19. +0
    -10
      gravatar/gravatar.php
  20. +0
    -12
      group_text/group_text.php
  21. +0
    -6
      highlightjs/highlightjs.php
  22. +0
    -6
      ifttt/ifttt.php
  23. +0
    -9
      ijpost/ijpost.php
  24. +0
    -7
      impressum/impressum.php
  25. +0
    -5
      infiniteimprobabilitydrive/infiniteimprobabilitydrive.php
  26. +0
    -7
      irc/irc.php
  27. +0
    -13
      jappixmini/jappixmini.php
  28. +1
    -24
      krynn/krynn.php
  29. +0
    -8
      langfilter/langfilter.php
  30. +0
    -6
      ldapauth/ldapauth.php
  31. +0
    -7
      leistungsschutzrecht/leistungsschutzrecht.php
  32. +0
    -10
      libertree/libertree.php
  33. +0
    -10
      libravatar/libravatar.php
  34. +0
    -9
      ljpost/ljpost.php
  35. +0
    -5
      mahjongg/mahjongg.php
  36. +0
    -13
      mailstream/mailstream.php
  37. +0
    -10
      mastodoncustomemojis/mastodoncustomemojis.php
  38. +0
    -12
      mathjax/mathjax.php
  39. +0
    -5
      membersince/membersince.php
  40. +0
    -12
      morechoice/morechoice.php
  41. +0
    -5
      morepokes/morepokes.php
  42. +0
    -5
      namethingy/namethingy.php
  43. +0
    -5
      newmemberwidget/newmemberwidget.php
  44. +0
    -10
      notifyall/notifyall.php
  45. +0
    -6
      notimeline/notimeline.php
  46. +0
    -8
      nsfw/nsfw.php
  47. +0
    -10
      numfriends/numfriends.php
  48. +0
    -12
      openstreetmap/openstreetmap.php
  49. +0
    -7
      piwik/piwik.php
  50. +0
    -21
      planets/planets.php
  51. +0
    -9
      public_server/public_server.php
  52. +0
    -13
      pumpio/pumpio.php
  53. +0
    -6
      qcomment/qcomment.php
  54. +3
    -8
      randplace/randplace.php
  55. +0
    -6
      remote_permissions/remote_permissions.php
  56. +0
    -6
      rendertime/rendertime.php
  57. +0
    -10
      securemail/securemail.php
  58. +0
    -7
      showmore/showmore.php
  59. +0
    -6
      smiley_pack/lang/smiley_pack_es/smiley_pack_es.php
  60. +0
    -6
      smiley_pack/lang/smiley_pack_fr/smiley_pack_fr.php
  61. +0
    -6
      smiley_pack/smiley_pack.php
  62. +0
    -10
      smileybutton/smileybutton.php
  63. +0
    -6
      smilies_adult/smilies_adult.php
  64. +0
    -5
      sniper/sniper.php
  65. +0
    -7
      startpage/startpage.php
  66. +0
    -18
      statusnet/statusnet.php
  67. +0
    -9
      superblock/superblock.php
  68. +0
    -11
      testdrive/testdrive.php
  69. +0
    -5
      tictac/tictac.php
  70. +0
    -10
      tumblr/tumblr.php
  71. +0
    -4
      unicode_smilies/unicode_smilies.php
  72. +0
    -7
      viewsrc/viewsrc.php
  73. +0
    -5
      webrtc/webrtc.php
  74. +0
    -5
      widgets/widgets.php
  75. +0
    -12
      windowsphonepush/windowsphonepush.php
  76. +0
    -16
      wppost/wppost.php
  77. +0
    -8
      xmpp/xmpp.php

+ 0
- 7
advancedcontentfilter/advancedcontentfilter.php View 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
*/


+ 0
- 3
blackout/blackout.php View 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()) {


+ 0
- 5
blockbot/blockbot.php View 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/");


+ 0
- 12
blockem/blockem.php View 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()) {


+ 0
- 16
blogger/blogger.php View 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()) {


+ 0
- 10
buffer/buffer.php View 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()
{
}


+ 0
- 5
buglink/buglink.php View 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>';


+ 0
- 5
calc/calc.php View 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>';
}


+ 0
- 12
catavatar/catavatar.php View 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
*/


+ 225
- 229
convert/convert.php View File

@ -1,229 +1,225 @@
<?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_uninstall() {
Hook::unregister('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;
}
<?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;
}

+ 0
- 7
curweather/curweather.php View 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)
{


+ 0
- 10
diaspora/diaspora.php View 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()) {


+ 0
- 9
dwpost/dwpost.php View 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()) {


+ 0
- 5
forumdirectory/forumdirectory.php View 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;


+ 0
- 9
fromapp/fromapp.php View 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'])) {


+ 0
- 7
geocoordinates/geocoordinates.php View 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"]))


+ 0
- 13
gnot/gnot.php View 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.


+ 0
- 7
googlemaps/googlemaps.php View 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)
{


+ 0
- 10
gravatar/gravatar.php View 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'));


+ 0
- 12
group_text/group_text.php View 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.


+ 0
- 6
highlightjs/highlightjs.php View 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') {


+ 0
- 6
ifttt/ifttt.php View 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()
{


+ 0
- 9
ijpost/ijpost.php View 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()) {


+ 0
- 7
impressum/impressum.php View 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() {


+ 0
- 5
infiniteimprobabilitydrive/infiniteimprobabilitydrive.php View 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>';


+ 0
- 7
irc/irc.php View 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;


+ 0
- 13
jappixmini/jappixmini.php View 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


+ 1
- 24
krynn/krynn.php View 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;


+ 0
- 8
langfilter/langfilter.php View 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


+ 0
- 6
ldapauth/ldapauth.php View 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'));


+ 0
- 7
leistungsschutzrecht/leistungsschutzrecht.php View 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;


+ 0
- 10
libertree/libertree.php View 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()) {


+ 0
- 10
libravatar/libravatar.php View 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'));


+ 0
- 9
ljpost/ljpost.php View 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)
{


+ 0
- 5
mahjongg/mahjongg.php View 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>';
}


+ 0
- 13
mailstream/mailstream.php View 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) {


+ 0
- 10
mastodoncustomemojis/mastodoncustomemojis.php View 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


+ 0
- 12
mathjax/mathjax.php View 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'])) {


+ 0
- 5
membersince/membersince.php View 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') {


+ 0
- 12
morechoice/morechoice.php View 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');


+ 0
- 5
morepokes/morepokes.php View 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')];


+ 0
- 5
namethingy/namethingy.php View 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>';
}


+ 0
- 5
newmemberwidget/newmemberwidget.php View 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'])) {


+ 0
- 10
notifyall/notifyall.php View 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)


+ 0
- 6
notimeline/notimeline.php View 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'])) {


+ 0
- 8
nsfw/nsfw.php View 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


+ 0
- 10
numfriends/numfriends.php View 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.


+ 0
- 12
openstreetmap/openstreetmap.php View 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'));


+ 0
- 7
piwik/piwik.php View 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'));


+ 0
- 21
planets/planets.php View 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) {
/**


+ 0
- 9
public_server/public_server.php View 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'));


+ 0
- 13
pumpio/pumpio.php View 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)


+ 0
- 6
qcomm