Browse Source

Replace deprecated Addon::*registerHook by Hook::*register

pull/784/head
Hypolite Petovan 3 years ago
parent
commit
c27b1cb66f
  1. 14
      advancedcontentfilter/advancedcontentfilter.php
  2. 6
      blackout/blackout.php
  3. 32
      blockem/blockem.php
  4. 32
      blogger/blogger.php
  5. 27
      buffer/buffer.php
  6. 6
      buglink/buglink.php
  7. 6
      calc/calc.php
  8. 14
      catavatar/catavatar.php
  9. 6
      convert/convert.php
  10. 14
      curweather/curweather.php
  11. 30
      diaspora/diaspora.php
  12. 22
      dwpost/dwpost.php
  13. 6
      fortunate/fortunate.php
  14. 6
      forumdirectory/forumdirectory.php
  15. 14
      fromapp/fromapp.php
  16. 18
      fromgplus/fromgplus.php
  17. 10
      geocoordinates/geocoordinates.php
  18. 18
      geonames/geonames.php
  19. 14
      gnot/gnot.php
  20. 7
      googlemaps/googlemaps.php
  21. 11
      gravatar/gravatar.php
  22. 10
      group_text/group_text.php
  23. 10
      highlightjs/highlightjs.php
  24. 10
      ifttt/ifttt.php
  25. 22
      ijpost/ijpost.php
  26. 14
      impressum/impressum.php
  27. 6
      infiniteimprobabilitydrive/infiniteimprobabilitydrive.php
  28. 12
      irc/irc.php
  29. 26
      jappixmini/jappixmini.php
  30. 18
      js_upload/js_upload.php
  31. 14
      krynn/krynn.php
  32. 16
      langfilter/langfilter.php
  33. 10
      ldapauth/ldapauth.php
  34. 14
      leistungsschutzrecht/leistungsschutzrecht.php
  35. 26
      libertree/libertree.php
  36. 11
      libravatar/libravatar.php
  37. 22
      ljpost/ljpost.php
  38. 6
      mahjongg/mahjongg.php
  39. 32
      mailstream/mailstream.php
  40. 26
      mastodoncustomemojis/mastodoncustomemojis.php
  41. 20
      mathjax/mathjax.php
  42. 6
      membersince/membersince.php
  43. 17
      morechoice/morechoice.php
  44. 6
      morepokes/morepokes.php
  45. 6
      namethingy/namethingy.php
  46. 6
      newmemberwidget/newmemberwidget.php
  47. 10
      notimeline/notimeline.php
  48. 16
      nsfw/nsfw.php
  49. 10
      numfriends/numfriends.php
  50. 26
      openstreetmap/openstreetmap.php
  51. 15
      pageheader/pageheader.php
  52. 10
      piwik/piwik.php
  53. 14
      planets/planets.php
  54. 14
      pledgie/pledgie.php
  55. 21
      public_server/public_server.php
  56. 42
      pumpio/pumpio.php
  57. 10
      qcomment/qcomment.php
  58. 14
      randplace/randplace.php
  59. 14
      remote_permissions/remote_permissions.php
  60. 8
      rendertime/rendertime.php
  61. 14
      securemail/securemail.php
  62. 14
      showmore/showmore.php
  63. 6
      smiley_pack/lang/smiley_pack_es/smiley_pack_es.php
  64. 6
      smiley_pack/lang/smiley_pack_fr/smiley_pack_fr.php
  65. 6
      smiley_pack/smiley_pack.php
  66. 5
      smileybutton/smileybutton.php
  67. 6
      smilies_adult/smilies_adult.php
  68. 6
      sniper/sniper.php
  69. 14
      startpage/startpage.php
  70. 44
      statusnet/statusnet.php
  71. 22
      superblock/superblock.php
  72. 22
      testdrive/testdrive.php
  73. 5
      tictac/tictac.php
  74. 26
      tumblr/tumblr.php
  75. 60
      twitter/twitter.php
  76. 6
      unicode_smilies/unicode_smilies.php
  77. 10
      viewsrc/viewsrc.php
  78. 6
      webrtc/webrtc.php
  79. 10
      widgets/widgets.php
  80. 13
      windowsphonepush/windowsphonepush.php
  81. 33
      wppost/wppost.php
  82. 18
      xmpp/xmpp.php

14
advancedcontentfilter/advancedcontentfilter.php

@ -36,8 +36,8 @@
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Content\Text\Markdown;
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
@ -60,9 +60,9 @@ require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'a
function advancedcontentfilter_install()
{
Addon::registerHook('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
Addon::registerHook('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
Addon::registerHook('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
Hook::register('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
Hook::register('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
Hook::register('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
DBStructure::update(false, true);
@ -71,9 +71,9 @@ function advancedcontentfilter_install()
function advancedcontentfilter_uninstall()
{
Addon::unregisterHook('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition');
Addon::unregisterHook('prepare_body_content_filter', __FILE__, 'advancedcontentfilter_prepare_body_content_filter');
Addon::unregisterHook('addon_settings' , __FILE__, 'advancedcontentfilter_addon_settings');
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');
}
/*

6
blackout/blackout.php

@ -50,17 +50,17 @@
*/
use Friendica\Core\Config;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
function blackout_install() {
Addon::registerHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
Hook::register('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
}
function blackout_uninstall() {
Addon::unregisterHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
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

32
blockem/blockem.php

@ -8,32 +8,32 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\Strings;
function blockem_install()
{
Addon::registerHook('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
Addon::registerHook('display_item' , 'addon/blockem/blockem.php', 'blockem_display_item');
Addon::registerHook('addon_settings' , 'addon/blockem/blockem.php', 'blockem_addon_settings');
Addon::registerHook('addon_settings_post' , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
Addon::registerHook('conversation_start' , 'addon/blockem/blockem.php', 'blockem_conversation_start');
Addon::registerHook('item_photo_menu' , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
Addon::registerHook('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
Hook::register('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
Hook::register('display_item' , 'addon/blockem/blockem.php', 'blockem_display_item');
Hook::register('addon_settings' , 'addon/blockem/blockem.php', 'blockem_addon_settings');
Hook::register('addon_settings_post' , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
Hook::register('conversation_start' , 'addon/blockem/blockem.php', 'blockem_conversation_start');
Hook::register('item_photo_menu' , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
Hook::register('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
}
function blockem_uninstall()
{
Addon::unregisterHook('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
Addon::unregisterHook('prepare_body' , 'addon/blockem/blockem.php', 'blockem_prepare_body');
Addon::unregisterHook('display_item' , 'addon/blockem/blockem.php', 'blockem_display_item');
Addon::unregisterHook('addon_settings' , 'addon/blockem/blockem.php', 'blockem_addon_settings');
Addon::unregisterHook('addon_settings_post' , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
Addon::unregisterHook('conversation_start' , 'addon/blockem/blockem.php', 'blockem_conversation_start');
Addon::unregisterHook('item_photo_menu' , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
Addon::unregisterHook('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
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)

32
blogger/blogger.php

@ -8,7 +8,7 @@
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -17,27 +17,27 @@ use Friendica\Util\XML;
function blogger_install()
{
Addon::registerHook('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
Addon::registerHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Addon::registerHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Addon::registerHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
Addon::registerHook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Addon::registerHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
Hook::register('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
Hook::register('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Hook::register('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Hook::register('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
Hook::register('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Hook::register('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
}
function blogger_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
Addon::unregisterHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Addon::unregisterHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Addon::unregisterHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Addon::unregisterHook('connector_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
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
Addon::unregisterHook('post_local_end', 'addon/blogger/blogger.php', 'blogger_send');
Addon::unregisterHook('addon_settings', 'addon/blogger/blogger.php', 'blogger_settings');
Addon::unregisterHook('addon_settings_post', 'addon/blogger/blogger.php', 'blogger_settings_post');
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');
}

27
buffer/buffer.php

@ -8,9 +8,8 @@
require 'addon/buffer/bufferapp.php';
use Friendica\App;
use Friendica\Content\Text\Plaintext;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -23,22 +22,22 @@ use Friendica\Util\Strings;
function buffer_install()
{
Addon::registerHook('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
Addon::registerHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Addon::registerHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Addon::registerHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
Addon::registerHook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
Addon::registerHook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
Hook::register('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
Hook::register('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Hook::register('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Hook::register('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
Hook::register('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
Hook::register('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
}
function buffer_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
Addon::unregisterHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Addon::unregisterHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Addon::unregisterHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/buffer/buffer.php', 'buffer_settings');
Addon::unregisterHook('connector_settings_post', 'addon/buffer/buffer.php', 'buffer_settings_post');
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()

6
buglink/buglink.php

@ -7,17 +7,17 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
function buglink_install()
{
Addon::registerHook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
Hook::register('page_end', 'addon/buglink/buglink.php', 'buglink_active');
}
function buglink_uninstall()
{
Addon::unregisterHook('page_end', 'addon/buglink/buglink.php', 'buglink_active');
Hook::unregister('page_end', 'addon/buglink/buglink.php', 'buglink_active');
}
function buglink_active(App $a, &$b)

6
calc/calc.php

@ -5,14 +5,14 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function calc_install() {
Addon::registerHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
Hook::register('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}
function calc_uninstall() {
Addon::unregisterHook('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
Hook::unregister('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}

14
catavatar/catavatar.php

@ -7,8 +7,8 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -26,9 +26,9 @@ define("CATAVATAR_SIZE", 256);
*/
function catavatar_install()
{
Addon::registerHook('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
Addon::registerHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
Hook::register('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
Hook::register('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
Hook::register('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
Logger::log('registered catavatar');
}
@ -38,9 +38,9 @@ function catavatar_install()
*/
function catavatar_uninstall()
{
Addon::unregisterHook('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
Addon::unregisterHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
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');
}

6
convert/convert.php

@ -5,14 +5,14 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function convert_install() {
Addon::registerHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
Hook::register('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
}
function convert_uninstall() {
Addon::unregisterHook('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
Hook::unregister('app_menu', 'addon/convert/convert.php', 'convert_app_menu');
}
function convert_app_menu($a,&$b) {

14
curweather/curweather.php

@ -12,9 +12,9 @@
require_once 'include/text.php';
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
@ -23,16 +23,16 @@ use Friendica\Util\Proxy as ProxyUtils;
function curweather_install()
{
Addon::registerHook('network_mod_init' , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
Addon::registerHook('addon_settings' , 'addon/curweather/curweather.php', 'curweather_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
Hook::register('network_mod_init' , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
Hook::register('addon_settings' , 'addon/curweather/curweather.php', 'curweather_addon_settings');
Hook::register('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
}
function curweather_uninstall()
{
Addon::unregisterHook('network_mod_init' , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
Addon::unregisterHook('addon_settings' , 'addon/curweather/curweather.php', 'curweather_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
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

30
diaspora/diaspora.php

@ -11,7 +11,7 @@ require_once 'addon/diaspora/Diaspora_Connection.php';
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -21,24 +21,24 @@ use Friendica\Model\Queue;
function diaspora_install()
{
Addon::registerHook('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
Addon::registerHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Addon::registerHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Addon::registerHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
Addon::registerHook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
Addon::registerHook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
Addon::registerHook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
Hook::register('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
Hook::register('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Hook::register('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Hook::register('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
Hook::register('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
Hook::register('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
Hook::register('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
}
function diaspora_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
Addon::unregisterHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Addon::unregisterHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Addon::unregisterHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/diaspora/diaspora.php', 'diaspora_settings');
Addon::unregisterHook('connector_settings_post', 'addon/diaspora/diaspora.php', 'diaspora_settings_post');
Addon::unregisterHook('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
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');
Hook::unregister('queue_predeliver', 'addon/diaspora/diaspora.php', 'diaspora_queue_hook');
}
function diaspora_jot_nets(App $a, &$b)

22
dwpost/dwpost.php

@ -10,7 +10,7 @@
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -21,20 +21,20 @@ use Friendica\Util\XML;
function dwpost_install()
{
Addon::registerHook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
Addon::registerHook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
Addon::registerHook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
Addon::registerHook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
Addon::registerHook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
Hook::register('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
Hook::register('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
Hook::register('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
Hook::register('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
Hook::register('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
}
function dwpost_uninstall()
{
Addon::unregisterHook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
Addon::unregisterHook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
Addon::unregisterHook('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
Addon::unregisterHook('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
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, &$b)

6
fortunate/fortunate.php

@ -6,7 +6,7 @@
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
* Status: Unsupported
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Util\Network;
// IMPORTANT: SET THIS to your fortunate server
@ -15,7 +15,7 @@ define('FORTUNATE_SERVER', 'hostname.com');
function fortunate_install()
{
Addon::registerHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
Hook::register('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
if (FORTUNATE_SERVER == 'hostname.com' && is_site_admin()) {
notice('Fortunate addon requires configuration. See README');
}
@ -23,7 +23,7 @@ function fortunate_install()
function fortunate_uninstall()
{
Addon::unregisterHook('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
Hook::unregister('page_end', 'addon/fortunate/fortunate.php', 'fortunate_fetch');
}

6
forumdirectory/forumdirectory.php

@ -10,8 +10,8 @@ use Friendica\App;
use Friendica\Content\Nav;
use Friendica\Content\Pager;
use Friendica\Content\Widget;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
@ -26,12 +26,12 @@ require_once 'include/text.php';
function forumdirectory_install()
{
Addon::registerHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
Hook::register('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
}
function forumdirectory_uninstall()
{
Addon::unregisterHook('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
Hook::unregister('app_menu', 'addon/forumdirectory/forumdirectory.php', 'forumdirectory_app_menu');
}
function forumdirectory_module()

14
fromapp/fromapp.php

@ -6,25 +6,25 @@
* Author: Commander Zot
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function fromapp_install()
{
Addon::registerHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
Addon::registerHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
Addon::registerHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
Hook::register('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
Hook::register('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
Hook::register('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
Logger::log("installed fromapp");
}
function fromapp_uninstall()
{
Addon::unregisterHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
Addon::unregisterHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
Addon::unregisterHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
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");
}

18
fromgplus/fromgplus.php

@ -9,8 +9,8 @@
define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -26,19 +26,19 @@ require_once 'mod/parse_url.php';
require_once 'include/text.php';
function fromgplus_install() {
Addon::registerHook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Addon::registerHook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Addon::registerHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
Hook::register('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Hook::register('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Hook::register('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
}
function fromgplus_uninstall() {
Addon::unregisterHook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Addon::unregisterHook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Addon::unregisterHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
Hook::unregister('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Hook::unregister('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Hook::unregister('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
// Old hooks
Addon::unregisterHook('addon_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Hook::unregister('addon_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Hook::unregister('addon_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
}
function fromgplus_addon_settings(&$a,&$s) {

10
geocoordinates/geocoordinates.php

@ -5,9 +5,9 @@
* Version: 0.1
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*/
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
@ -16,15 +16,15 @@ use Friendica\Util\Strings;
function geocoordinates_install()
{
Addon::registerHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Addon::registerHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Hook::register('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Hook::register('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
}
function geocoordinates_uninstall()
{
Addon::unregisterHook('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
Addon::unregisterHook('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
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)

18
geonames/geonames.php

@ -21,8 +21,8 @@
* system will call the name_uninstall() function.
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -31,7 +31,7 @@ use Friendica\Util\XML;
function geonames_install() {
Addon::registerHook('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
Hook::register('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
/**
*
@ -40,7 +40,7 @@ function geonames_install() {
*
*/
Addon::registerHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
Hook::register('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
/**
*
@ -50,8 +50,8 @@ function geonames_install() {
*
*/
Addon::registerHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
Addon::registerHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
Hook::register('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
Hook::register('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
Logger::log("installed geonames");
}
@ -67,10 +67,10 @@ function geonames_uninstall() {
*
*/
Addon::unregisterHook('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
Addon::unregisterHook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
Addon::unregisterHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
Addon::unregisterHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
Hook::unregister('load_config', 'addon/geonames/geonames.php', 'geonames_load_config');
Hook::unregister('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
Hook::unregister('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
Hook::unregister('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
Logger::log("removed geonames");

14
gnot/gnot.php

@ -7,16 +7,16 @@
*
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function gnot_install() {
Addon::registerHook('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
Addon::registerHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
Addon::registerHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
Hook::register('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
Hook::register('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
Hook::register('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
Logger::log("installed gnot");
}
@ -24,9 +24,9 @@ function gnot_install() {
function gnot_uninstall() {
Addon::unregisterHook('addon_settings', 'addon/gnot/gnot.php', 'gnot_settings');
Addon::unregisterHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
Addon::unregisterHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
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");

7
googlemaps/googlemaps.php

@ -6,20 +6,19 @@
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
function googlemaps_install()
{
Addon::registerHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
Hook::register('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
Logger::log("installed googlemaps");
}
function googlemaps_uninstall()
{
Addon::unregisterHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
Hook::unregister('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
Logger::log("removed googlemaps");
}

11
gravatar/gravatar.php

@ -8,21 +8,20 @@
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Util\Security;
use Friendica\Util\Strings;
/**
* Installs the addon hook
*/
function gravatar_install() {
Addon::registerHook('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
Addon::registerHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
Hook::register('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
Hook::register('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
Logger::log("registered gravatar in avatar_lookup hook");
}
@ -31,8 +30,8 @@ function gravatar_install() {
* Removes the addon hook
*/
function gravatar_uninstall() {
Addon::unregisterHook('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
Addon::unregisterHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
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");
}

10
group_text/group_text.php

@ -5,15 +5,15 @@
* Version: 1.0
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function group_text_install() {
Addon::registerHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
Addon::registerHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
Hook::register('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
Hook::register('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
Logger::log("installed group_text");
}
@ -21,8 +21,8 @@ function group_text_install() {
function group_text_uninstall() {
Addon::unregisterHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
Addon::unregisterHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
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");

10
highlightjs/highlightjs.php

@ -7,18 +7,18 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
function highlightjs_install()
{
Addon::registerHook('head' , __FILE__, 'highlightjs_head');
Addon::registerHook('footer', __FILE__, 'highlightjs_footer');
Hook::register('head' , __FILE__, 'highlightjs_head');
Hook::register('footer', __FILE__, 'highlightjs_footer');
}
function highlightjs_uninstall()
{
Addon::unregisterHook('head' , __FILE__, 'highlightjs_head');
Addon::unregisterHook('footer', __FILE__, 'highlightjs_footer');
Hook::unregister('head' , __FILE__, 'highlightjs_head');
Hook::unregister('footer', __FILE__, 'highlightjs_footer');
}
function highlightjs_head(App $a, &$b)

10
ifttt/ifttt.php

@ -11,7 +11,7 @@ require_once 'include/items.php';
require_once 'include/text.php';
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -22,14 +22,14 @@ use Friendica\Util\Strings;
function ifttt_install()
{
Addon::registerHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
Addon::registerHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
Hook::register('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
Hook::register('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
}
function ifttt_uninstall()
{
Addon::unregisterHook('connector_settings', 'addon/ifttt/ifttt.php', 'ifttt_settings');
Addon::unregisterHook('connector_settings_post', 'addon/ifttt/ifttt.php', 'ifttt_settings_post');
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()

22
ijpost/ijpost.php

@ -9,7 +9,7 @@
*/
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -19,20 +19,20 @@ use Friendica\Util\XML;
function ijpost_install()
{
Addon::registerHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Addon::registerHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Addon::registerHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Addon::registerHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Addon::registerHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
Hook::register('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Hook::register('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Hook::register('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Hook::register('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Hook::register('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
}
function ijpost_uninstall()
{
Addon::unregisterHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Addon::unregisterHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Addon::unregisterHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Addon::unregisterHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
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(&$a, &$b)

14
impressum/impressum.php

@ -8,8 +8,8 @@
*/
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
@ -17,16 +17,16 @@ use Friendica\Util\Proxy as ProxyUtils;
use Friendica\Util\Strings;
function impressum_install() {
Addon::registerHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
Addon::registerHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
Addon::registerHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
Hook::register('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
Hook::register('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
Hook::register('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
Logger::log("installed impressum Addon");
}
function impressum_uninstall() {
Addon::unregisterHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
Addon::unregisterHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
Addon::unregisterHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
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");
}

6
infiniteimprobabilitydrive/infiniteimprobabilitydrive.php

@ -5,17 +5,17 @@
* Version: 1.0
* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
function infiniteimprobabilitydrive_install()
{
Addon::registerHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
Hook::register('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
}
function infiniteimprobabilitydrive_uninstall()
{
Addon::unregisterHook('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
Hook::unregister('app_menu', 'addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php', 'infiniteimprobabilitydrive_app_menu');
}
function infiniteimprobabilitydrive_app_menu($a, &$b)

12
irc/irc.php

@ -6,21 +6,21 @@
* Author: tony baldwin <https://free-haven.org/profile/tony>
* Author: Tobias Diekershoff <https://f.diekershoff.de/u/tobias>
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
function irc_install() {
Addon::registerHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
Addon::registerHook('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
Hook::register('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
Hook::register('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
Hook::register('addon_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
}
function irc_uninstall() {
Addon::unregisterHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
Addon::unregisterHook('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
Hook::unregister('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
Hook::unregister('addon_settings', 'addon/irc/irc.php', 'irc_addon_settings');
}

26
jappixmini/jappixmini.php

@ -63,8 +63,8 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -75,16 +75,16 @@ use Friendica\Util\Network;
function jappixmini_install()
{
Addon::registerHook('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
Addon::registerHook('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
Hook::register('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
Hook::register('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
Addon::registerHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
Addon::registerHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
Hook::register('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
Hook::register('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
Addon::registerHook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
Hook::register('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
// Jappix source download as required by AGPL
Addon::registerHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
Hook::register('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
// set standard configuration
$info_text = Config::get("jappixmini", "infotext");
@ -109,15 +109,15 @@ function jappixmini_install()
function jappixmini_uninstall()
{
Addon::unregisterHook('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
Addon::unregisterHook('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
Hook::unregister('addon_settings', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings');
Hook::unregister('addon_settings_post', 'addon/jappixmini/jappixmini.php', 'jappixmini_settings_post');
Addon::unregisterHook('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
Addon::unregisterHook('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
Hook::unregister('page_end', 'addon/jappixmini/jappixmini.php', 'jappixmini_script');
Hook::unregister('authenticate', 'addon/jappixmini/jappixmini.php', 'jappixmini_login');
Addon::unregisterHook('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
Hook::unregister('cron', 'addon/jappixmini/jappixmini.php', 'jappixmini_cron');
Addon::unregisterHook('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
Hook::unregister('about_hook', 'addon/jappixmini/jappixmini.php', 'jappixmini_download_source');
}
function jappixmini_addon_admin(App $a, &$o)

18
js_upload/js_upload.php

@ -14,24 +14,24 @@
* Module Author: Chris Case
*
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
function js_upload_install() {
Addon::registerHook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
Addon::registerHook('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
Addon::registerHook('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
Addon::registerHook('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
Hook::register('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
Hook::register('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
Hook::register('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
Hook::register('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
}
function js_upload_uninstall() {
Addon::unregisterHook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
Addon::unregisterHook('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
Addon::unregisterHook('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
Addon::unregisterHook('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
Hook::unregister('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
Hook::unregister('photo_post_init', 'addon/js_upload/js_upload.php', 'js_upload_post_init');
Hook::unregister('photo_post_file', 'addon/js_upload/js_upload.php', 'js_upload_post_file');
Hook::unregister('photo_post_end', 'addon/js_upload/js_upload.php', 'js_upload_post_end');
}

14
krynn/krynn.php

@ -9,7 +9,7 @@
*
*"My body was my sacrifice... for my magic. This damage is permanent." - Raistlin Majere
*/
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -23,7 +23,7 @@ function krynn_install() {
*
*/
Addon::registerHook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
Hook::register('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
/**
*
@ -33,8 +33,8 @@ function krynn_install() {
*
*/
Addon::registerHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
Addon::registerHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
Hook::register('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
Hook::register('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
Logger::log("installed krynn");
}
@ -50,9 +50,9 @@ function krynn_uninstall() {
*
*/
Addon::unregisterHook('post_local', 'addon/krynn/krynn.php', 'krynn_post_hook');
Addon::unregisterHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
Addon::unregisterHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
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");

16
langfilter/langfilter.php

@ -9,7 +9,7 @@
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
@ -21,17 +21,17 @@ use Friendica\Core\Renderer;
function langfilter_install()
{
Addon::registerHook('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter', 10);
Addon::registerHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
Hook::register('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter', 10);
Hook::register('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
Hook::register('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
}
function langfilter_uninstall()
{
Addon::unregisterHook('prepare_body_content_filter', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body_content_filter');
Addon::unregisterHook('prepare_body', 'addon/langfilter/langfilter.php', 'langfilter_prepare_body');
Addon::unregisterHook('addon_settings', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/langfilter/langfilter.php', 'langfilter_addon_settings_post');
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

10
ldapauth/ldapauth.php

@ -53,21 +53,21 @@
*
* ...etc.
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Model\User;
function ldapauth_install()
{
Addon::registerHook('load_config', 'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
Addon::registerHook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
Hook::register('load_config', 'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
Hook::register('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
}
function ldapauth_uninstall()
{
Addon::unregisterHook('load_config', 'addon/ldapauth/ldapauth.php', 'ldapauth_load_config');
Addon::unregisterHook('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate');
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)

14
leistungsschutzrecht/leistungsschutzrecht.php

@ -5,22 +5,22 @@
* Version: 0.1
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Util\Network;
function leistungsschutzrecht_install() {
Addon::registerHook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
Addon::registerHook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Addon::registerHook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Hook::register('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
Hook::register('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Hook::register('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
}
function leistungsschutzrecht_uninstall() {
Addon::unregisterHook('cron', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_cron');
Addon::unregisterHook('getsiteinfo', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
Addon::unregisterHook('page_info_data', 'addon/leistungsschutzrecht/leistungsschutzrecht.php', 'leistungsschutzrecht_getsiteinfo');
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) {

26
libertree/libertree.php

@ -8,7 +8,7 @@
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -17,22 +17,22 @@ use Friendica\Util\Network;
function libertree_install()
{
Addon::registerHook('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
Addon::registerHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Addon::registerHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Addon::registerHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Addon::registerHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Addon::registerHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
Hook::register('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
Hook::register('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Hook::register('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Hook::register('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Hook::register('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Hook::register('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
}
function libertree_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
Addon::unregisterHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Addon::unregisterHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Addon::unregisterHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Addon::unregisterHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
Hook::unregister('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
<