Browse Source

Replace deprecated Addon::callHooks with Hook::callAll

- Update documentation
pull/6482/head
Hypolite Petovan 2 years ago
parent
commit
55e54bb950
58 changed files with 450 additions and 475 deletions
  1. +135
    -135
      doc/Addons.md
  2. +131
    -131
      doc/de/Addons.md
  3. +4
    -4
      include/api.php
  4. +7
    -7
      include/conversation.php
  5. +5
    -5
      include/enotify.php
  6. +2
    -2
      include/items.php
  7. +2
    -2
      mod/acl.php
  8. +2
    -2
      mod/directory.php
  9. +0
    -1
      mod/editpost.php
  10. +2
    -1
      mod/friendica.php
  11. +3
    -3
      mod/home.php
  12. +4
    -4
      mod/item.php
  13. +2
    -2
      mod/lockview.php
  14. +2
    -3
      mod/manage.php
  15. +2
    -3
      mod/network.php
  16. +2
    -2
      mod/parse_url.php
  17. +9
    -10
      mod/photos.php
  18. +2
    -3
      mod/ping.php
  19. +3
    -7
      mod/poke.php
  20. +2
    -3
      mod/profile.php
  21. +3
    -3
      mod/profiles.php
  22. +3
    -3
      mod/register.php
  23. +9
    -9
      mod/settings.php
  24. +2
    -2
      mod/subthread.php
  25. +2
    -2
      mod/tagger.php
  26. +2
    -2
      mod/uexport.php
  27. +2
    -2
      mod/xrd.php
  28. +10
    -10
      src/App.php
  29. +8
    -6
      src/Content/ContactSelector.php
  30. +3
    -3
      src/Content/Feature.php
  31. +4
    -5
      src/Content/Nav.php
  32. +2
    -2
      src/Content/OEmbed.php
  33. +2
    -3
      src/Content/Smilies.php
  34. +3
    -3
      src/Content/Text/BBCode.php
  35. +3
    -4
      src/Content/Text/HTML.php
  36. +6
    -8
      src/Core/ACL.php
  37. +1
    -6
      src/Core/Authentication.php
  38. +1
    -4
      src/Core/L10n.php
  39. +1
    -2
      src/Core/Worker.php
  40. +1
    -2
      src/Model/Contact.php
  41. +3
    -3
      src/Model/Event.php
  42. +12
    -12
      src/Model/Item.php
  43. +6
    -6
      src/Model/Profile.php
  44. +1
    -2
      src/Model/User.php
  45. +3
    -3
      src/Module/Contact.php
  46. +3
    -3
      src/Module/Login.php
  47. +3
    -3
      src/Module/Logout.php
  48. +2
    -2
      src/Network/FKOAuth1.php
  49. +3
    -2
      src/Object/Post.php
  50. +4
    -4
      src/Protocol/DFRN.php
  51. +2
    -2
      src/Render/FriendicaSmartyEngine.php
  52. +3
    -4
      src/Util/Crypto.php
  53. +3
    -3
      src/Util/Emailer.php
  54. +4
    -4
      src/Util/Map.php
  55. +2
    -3
      src/Util/Network.php
  56. +2
    -3
      src/Util/ParseUrl.php
  57. +2
    -2
      src/Worker/Directory.php
  58. +3
    -3
      src/Worker/Queue.php

+ 135
- 135
doc/Addons.md View File

@ -417,281 +417,281 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
### index.php
Addon::callHooks('init_1');
Addon::callHooks('app_menu', $arr);
Addon::callHooks('page_content_top', $a->page['content']);
Addon::callHooks($a->module.'_mod_init', $placeholder);
Addon::callHooks($a->module.'_mod_init', $placeholder);
Addon::callHooks($a->module.'_mod_post', $_POST);
Addon::callHooks($a->module.'_mod_afterpost', $placeholder);
Addon::callHooks($a->module.'_mod_content', $arr);
Addon::callHooks($a->module.'_mod_aftercontent', $arr);
Addon::callHooks('page_end', $a->page['content']);
Hook::callAll('init_1');
Hook::callAll('app_menu', $arr);
Hook::callAll('page_content_top', $a->page['content']);
Hook::callAll($a->module.'_mod_init', $placeholder);
Hook::callAll($a->module.'_mod_init', $placeholder);
Hook::callAll($a->module.'_mod_post', $_POST);
Hook::callAll($a->module.'_mod_afterpost', $placeholder);
Hook::callAll($a->module.'_mod_content', $arr);
Hook::callAll($a->module.'_mod_aftercontent', $arr);
Hook::callAll('page_end', $a->page['content']);
### include/api.php
Addon::callHooks('logged_in', $a->user);
Addon::callHooks('authenticate', $addon_auth);
Addon::callHooks('logged_in', $a->user);
Hook::callAll('logged_in', $a->user);
Hook::callAll('authenticate', $addon_auth);
Hook::callAll('logged_in', $a->user);
### include/enotify.php
Addon::callHooks('enotify', $h);
Addon::callHooks('enotify_store', $datarray);
Addon::callHooks('enotify_mail', $datarray);
Addon::callHooks('check_item_notification', $notification_data);
Hook::callAll('enotify', $h);
Hook::callAll('enotify_store', $datarray);
Hook::callAll('enotify_mail', $datarray);
Hook::callAll('check_item_notification', $notification_data);
### include/conversation.php
Addon::callHooks('conversation_start', $cb);
Addon::callHooks('render_location', $locate);
Addon::callHooks('display_item', $arr);
Addon::callHooks('display_item', $arr);
Addon::callHooks('item_photo_menu', $args);
Addon::callHooks('jot_tool', $jotplugins);
Hook::callAll('conversation_start', $cb);
Hook::callAll('render_location', $locate);
Hook::callAll('display_item', $arr);
Hook::callAll('display_item', $arr);
Hook::callAll('item_photo_menu', $args);
Hook::callAll('jot_tool', $jotplugins);
### include/text.php
Addon::callHooks('contact_block_end', $arr);
Addon::callHooks('poke_verbs', $arr);
Addon::callHooks('put_item_in_cache', $hook_data);
Addon::callHooks('prepare_body_init', $item);
Addon::callHooks('prepare_body_content_filter', $hook_data);
Addon::callHooks('prepare_body', $hook_data);
Addon::callHooks('prepare_body_final', $hook_data);
Hook::callAll('contact_block_end', $arr);
Hook::callAll('poke_verbs', $arr);
Hook::callAll('put_item_in_cache', $hook_data);
Hook::callAll('prepare_body_init', $item);
Hook::callAll('prepare_body_content_filter', $hook_data);
Hook::callAll('prepare_body', $hook_data);
Hook::callAll('prepare_body_final', $hook_data);
### include/items.php
Addon::callHooks('page_info_data', $data);
Hook::callAll('page_info_data', $data);
### mod/directory.php
Addon::callHooks('directory_item', $arr);
Hook::callAll('directory_item', $arr);
### mod/xrd.php
Addon::callHooks('personal_xrd', $arr);
Hook::callAll('personal_xrd', $arr);
### mod/ping.php
Addon::callHooks('network_ping', $arr);
Hook::callAll('network_ping', $arr);
### mod/parse_url.php
Addon::callHooks("parse_link", $arr);
Hook::callAll("parse_link", $arr);
### mod/manage.php
Addon::callHooks('home_init', $ret);
Hook::callAll('home_init', $ret);
### mod/acl.php
Addon::callHooks('acl_lookup_end', $results);
Hook::callAll('acl_lookup_end', $results);
### mod/network.php
Addon::callHooks('network_content_init', $arr);
Addon::callHooks('network_tabs', $arr);
Hook::callAll('network_content_init', $arr);
Hook::callAll('network_tabs', $arr);
### mod/friendica.php
Addon::callHooks('about_hook', $o);
Hook::callAll('about_hook', $o);
### mod/subthread.php
Addon::callHooks('post_local_end', $arr);
Hook::callAll('post_local_end', $arr);
### mod/profiles.php
Addon::callHooks('profile_post', $_POST);
Addon::callHooks('profile_edit', $arr);
Hook::callAll('profile_post', $_POST);
Hook::callAll('profile_edit', $arr);
### mod/settings.php
Addon::callHooks('addon_settings_post', $_POST);
Addon::callHooks('connector_settings_post', $_POST);
Addon::callHooks('display_settings_post', $_POST);
Addon::callHooks('settings_post', $_POST);
Addon::callHooks('addon_settings', $settings_addons);
Addon::callHooks('connector_settings', $settings_connectors);
Addon::callHooks('display_settings', $o);
Addon::callHooks('settings_form', $o);
Hook::callAll('addon_settings_post', $_POST);
Hook::callAll('connector_settings_post', $_POST);
Hook::callAll('display_settings_post', $_POST);
Hook::callAll('settings_post', $_POST);
Hook::callAll('addon_settings', $settings_addons);
Hook::callAll('connector_settings', $settings_connectors);
Hook::callAll('display_settings', $o);
Hook::callAll('settings_form', $o);
### mod/photos.php
Addon::callHooks('photo_post_init', $_POST);
Addon::callHooks('photo_post_file', $ret);
Addon::callHooks('photo_post_end', $foo);
Addon::callHooks('photo_post_end', $foo);
Addon::callHooks('photo_post_end', $foo);
Addon::callHooks('photo_post_end', $foo);
Addon::callHooks('photo_post_end', intval($item_id));
Addon::callHooks('photo_upload_form', $ret);
Hook::callAll('photo_post_init', $_POST);
Hook::callAll('photo_post_file', $ret);
Hook::callAll('photo_post_end', $foo);
Hook::callAll('photo_post_end', $foo);
Hook::callAll('photo_post_end', $foo);
Hook::callAll('photo_post_end', $foo);
Hook::callAll('photo_post_end', intval($item_id));
Hook::callAll('photo_upload_form', $ret);
### mod/profile.php
Addon::callHooks('profile_advanced', $o);
Hook::callAll('profile_advanced', $o);
### mod/home.php
Addon::callHooks('home_init', $ret);
Addon::callHooks("home_content", $content);
Hook::callAll('home_init', $ret);
Hook::callAll("home_content", $content);
### mod/poke.php
Addon::callHooks('post_local_end', $arr);
Hook::callAll('post_local_end', $arr);
### mod/contacts.php
Addon::callHooks('contact_edit_post', $_POST);
Addon::callHooks('contact_edit', $arr);
Hook::callAll('contact_edit_post', $_POST);
Hook::callAll('contact_edit', $arr);
### mod/tagger.php
Addon::callHooks('post_local_end', $arr);
Hook::callAll('post_local_end', $arr);
### mod/lockview.php
Addon::callHooks('lockview_content', $item);
Hook::callAll('lockview_content', $item);
### mod/uexport.php
Addon::callHooks('uexport_options', $options);
Hook::callAll('uexport_options', $options);
### mod/register.php
Addon::callHooks('register_post', $arr);
Addon::callHooks('register_form', $arr);
Hook::callAll('register_post', $arr);
Hook::callAll('register_form', $arr);
### mod/item.php
Addon::callHooks('post_local_start', $_REQUEST);
Addon::callHooks('post_local', $datarray);
Addon::callHooks('post_local_end', $datarray);
Hook::callAll('post_local_start', $_REQUEST);
Hook::callAll('post_local', $datarray);
Hook::callAll('post_local_end', $datarray);
### mod/editpost.php
Addon::callHooks('jot_tool', $jotplugins);
Hook::callAll('jot_tool', $jotplugins);
### src/Network/FKOAuth1.php
Addon::callHooks('logged_in', $a->user);
Hook::callAll('logged_in', $a->user);
### src/Render/FriendicaSmartyEngine.php
Addon::callHooks("template_vars", $arr);
Hook::callAll("template_vars", $arr);
### src/App.php
Addon::callHooks('load_config');
Addon::callHooks('head');
Addon::callHooks('footer');
Hook::callAll('load_config');
Hook::callAll('head');
Hook::callAll('footer');
### src/Model/Item.php
Addon::callHooks('post_local', $item);
Addon::callHooks('post_remote', $item);
Addon::callHooks('post_local_end', $posted_item);
Addon::callHooks('post_remote_end', $posted_item);
Addon::callHooks('tagged', $arr);
Addon::callHooks('post_local_end', $new_item);
Hook::callAll('post_local', $item);
Hook::callAll('post_remote', $item);
Hook::callAll('post_local_end', $posted_item);
Hook::callAll('post_remote_end', $posted_item);
Hook::callAll('tagged', $arr);
Hook::callAll('post_local_end', $new_item);
### src/Model/Contact.php
Addon::callHooks('contact_photo_menu', $args);
Addon::callHooks('follow', $arr);
Hook::callAll('contact_photo_menu', $args);
Hook::callAll('follow', $arr);
### src/Model/Profile.php
Addon::callHooks('profile_sidebar_enter', $profile);
Addon::callHooks('profile_sidebar', $arr);
Addon::callHooks('profile_tabs', $arr);
Addon::callHooks('zrl_init', $arr);
Addon::callHooks('magic_auth_success', $arr);
Hook::callAll('profile_sidebar_enter', $profile);
Hook::callAll('profile_sidebar', $arr);
Hook::callAll('profile_tabs', $arr);
Hook::callAll('zrl_init', $arr);
Hook::callAll('magic_auth_success', $arr);
### src/Model/Event.php
Addon::callHooks('event_updated', $event['id']);
Addon::callHooks("event_created", $event['id']);
Hook::callAll('event_updated', $event['id']);
Hook::callAll("event_created", $event['id']);
### src/Model/User.php
Addon::callHooks('register_account', $uid);
Addon::callHooks('remove_user', $user);
Hook::callAll('register_account', $uid);
Hook::callAll('remove_user', $user);
### src/Content/Text/BBCode.php
Addon::callHooks('bbcode', $text);
Addon::callHooks('bb2diaspora', $text);
Hook::callAll('bbcode', $text);
Hook::callAll('bb2diaspora', $text);
### src/Content/Text/HTML.php
Addon::callHooks('html2bbcode', $message);
Hook::callAll('html2bbcode', $message);
### src/Content/Smilies.php
Addon::callHooks('smilie', $params);
Hook::callAll('smilie', $params);
### src/Content/Feature.php
Addon::callHooks('isEnabled', $arr);
Addon::callHooks('get', $arr);
Hook::callAll('isEnabled', $arr);
Hook::callAll('get', $arr);
### src/Content/ContactSelector.php
Addon::callHooks('network_to_name', $nets);
Addon::callHooks('gender_selector', $select);
Addon::callHooks('sexpref_selector', $select);
Addon::callHooks('marital_selector', $select);
Hook::callAll('network_to_name', $nets);
Hook::callAll('gender_selector', $select);
Hook::callAll('sexpref_selector', $select);
Hook::callAll('marital_selector', $select);
### src/Content/OEmbed.php
Addon::callHooks('oembed_fetch_url', $embedurl, $j);
Hook::callAll('oembed_fetch_url', $embedurl, $j);
### src/Content/Nav.php
Addon::callHooks('page_header', $a->page['nav']);
Addon::callHooks('nav_info', $nav);
Hook::callAll('page_header', $a->page['nav']);
Hook::callAll('nav_info', $nav);
### src/Worker/Directory.php
Addon::callHooks('globaldir_update', $arr);
Hook::callAll('globaldir_update', $arr);
### src/Worker/Notifier.php
Addon::callHooks('notifier_end', $target_item);
Hook::callAll('notifier_end', $target_item);
### src/Worker/Queue.php
Addon::callHooks('queue_predeliver', $r);
Addon::callHooks('queue_deliver', $params);
Hook::callAll('queue_predeliver', $r);
Hook::callAll('queue_deliver', $params);
### src/Module/Login.php
Addon::callHooks('authenticate', $addon_auth);
Addon::callHooks('login_hook', $o);
Hook::callAll('authenticate', $addon_auth);
Hook::callAll('login_hook', $o);
### src/Module/Logout.php
Addon::callHooks("logging_out");
Hook::callAll("logging_out");
### src/Object/Post.php
Addon::callHooks('render_location', $locate);
Addon::callHooks('display_item', $arr);
Hook::callAll('render_location', $locate);
Hook::callAll('display_item', $arr);
### src/Core/ACL.php
Addon::callHooks('contact_select_options', $x);
Addon::callHooks($a->module.'_pre_'.$selname, $arr);
Addon::callHooks($a->module.'_post_'.$selname, $o);
Addon::callHooks($a->module.'_pre_'.$selname, $arr);
Addon::callHooks($a->module.'_post_'.$selname, $o);
Addon::callHooks('jot_networks', $jotnets);
Hook::callAll('contact_select_options', $x);
Hook::callAll($a->module.'_pre_'.$selname, $arr);
Hook::callAll($a->module.'_post_'.$selname, $o);
Hook::callAll($a->module.'_pre_'.$selname, $arr);
Hook::callAll($a->module.'_post_'.$selname, $o);
Hook::callAll('jot_networks', $jotnets);
### src/Core/Authentication.php
Addon::callHooks('logged_in', $a->user);
Hook::callAll('logged_in', $a->user);
### src/Core/Hook.php
@ -699,31 +699,31 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
### src/Core/Worker.php
Addon::callHooks("proc_run", $arr);
Hook::callAll("proc_run", $arr);
### src/Util/Emailer.php
Addon::callHooks('emailer_send_prepare', $params);
Addon::callHooks("emailer_send", $hookdata);
Hook::callAll('emailer_send_prepare', $params);
Hook::callAll("emailer_send", $hookdata);
### src/Util/Map.php
Addon::callHooks('generate_map', $arr);
Addon::callHooks('generate_named_map', $arr);
Addon::callHooks('Map::getCoordinates', $arr);
Hook::callAll('generate_map', $arr);
Hook::callAll('generate_named_map', $arr);
Hook::callAll('Map::getCoordinates', $arr);
### src/Util/Network.php
Addon::callHooks('avatar_lookup', $avatar);
Hook::callAll('avatar_lookup', $avatar);
### src/Util/ParseUrl.php
Addon::callHooks("getsiteinfo", $siteinfo);
Hook::callAll("getsiteinfo", $siteinfo);
### src/Protocol/DFRN.php
Addon::callHooks('atom_feed_end', $atom);
Addon::callHooks('atom_feed_end', $atom);
Hook::callAll('atom_feed_end', $atom);
Hook::callAll('atom_feed_end', $atom);
### view/js/main.js


+ 131
- 131
doc/de/Addons.md View File

@ -193,299 +193,299 @@ Eine komplette Liste aller Hook-Callbacks mit den zugehörigen Dateien (am 01-Ap
### index.php
Addon::callHooks('init_1');
Addon::callHooks('app_menu', $arr);
Addon::callHooks('page_content_top', $a->page['content']);
Addon::callHooks($a->module.'_mod_init', $placeholder);
Addon::callHooks($a->module.'_mod_init', $placeholder);
Addon::callHooks($a->module.'_mod_post', $_POST);
Addon::callHooks($a->module.'_mod_afterpost', $placeholder);
Addon::callHooks($a->module.'_mod_content', $arr);
Addon::callHooks($a->module.'_mod_aftercontent', $arr);
Addon::callHooks('page_end', $a->page['content']);
Hook::callAll('init_1');
Hook::callAll('app_menu', $arr);
Hook::callAll('page_content_top', $a->page['content']);
Hook::callAll($a->module.'_mod_init', $placeholder);
Hook::callAll($a->module.'_mod_init', $placeholder);
Hook::callAll($a->module.'_mod_post', $_POST);
Hook::callAll($a->module.'_mod_afterpost', $placeholder);
Hook::callAll($a->module.'_mod_content', $arr);
Hook::callAll($a->module.'_mod_aftercontent', $arr);
Hook::callAll('page_end', $a->page['content']);
### include/api.php
Addon::callHooks('logged_in', $a->user);
Addon::callHooks('authenticate', $addon_auth);
Addon::callHooks('logged_in', $a->user);
Hook::callAll('logged_in', $a->user);
Hook::callAll('authenticate', $addon_auth);
Hook::callAll('logged_in', $a->user);
### include/enotify.php
Addon::callHooks('enotify', $h);
Addon::callHooks('enotify_store', $datarray);
Addon::callHooks('enotify_mail', $datarray);
Addon::callHooks('check_item_notification', $notification_data);
Hook::callAll('enotify', $h);
Hook::callAll('enotify_store', $datarray);
Hook::callAll('enotify_mail', $datarray);
Hook::callAll('check_item_notification', $notification_data);
### include/conversation.php
Addon::callHooks('conversation_start', $cb);
Addon::callHooks('render_location', $locate);
Addon::callHooks('display_item', $arr);
Addon::callHooks('display_item', $arr);
Addon::callHooks('item_photo_menu', $args);
Addon::callHooks('jot_tool', $jotplugins);
Hook::callAll('conversation_start', $cb);
Hook::callAll('render_location', $locate);
Hook::callAll('display_item', $arr);
Hook::callAll('display_item', $arr);
Hook::callAll('item_photo_menu', $args);
Hook::callAll('jot_tool', $jotplugins);
### include/text.php
Addon::callHooks('contact_block_end', $arr);
Addon::callHooks('poke_verbs', $arr);
Addon::callHooks('put_item_in_cache', $hook_data);
Addon::callHooks('prepare_body_init', $item);
Addon::callHooks('prepare_body_content_filter', $hook_data);
Addon::callHooks('prepare_body', $hook_data);
Addon::callHooks('prepare_body_final', $hook_data);
Hook::callAll('contact_block_end', $arr);
Hook::callAll('poke_verbs', $arr);
Hook::callAll('put_item_in_cache', $hook_data);
Hook::callAll('prepare_body_init', $item);
Hook::callAll('prepare_body_content_filter', $hook_data);
Hook::callAll('prepare_body', $hook_data);
Hook::callAll('prepare_body_final', $hook_data);
### include/items.php
Addon::callHooks('page_info_data', $data);
Hook::callAll('page_info_data', $data);
### mod/directory.php
Addon::callHooks('directory_item', $arr);
Hook::callAll('directory_item', $arr);
### mod/xrd.php
Addon::callHooks('personal_xrd', $arr);
Hook::callAll('personal_xrd', $arr);
### mod/ping.php
Addon::callHooks('network_ping', $arr);
Hook::callAll('network_ping', $arr);
### mod/parse_url.php
Addon::callHooks("parse_link", $arr);
Hook::callAll("parse_link", $arr);
### mod/manage.php
Addon::callHooks('home_init', $ret);
Hook::callAll('home_init', $ret);
### mod/acl.php
Addon::callHooks('acl_lookup_end', $results);
Hook::callAll('acl_lookup_end', $results);
### mod/network.php
Addon::callHooks('network_content_init', $arr);
Addon::callHooks('network_tabs', $arr);
Hook::callAll('network_content_init', $arr);
Hook::callAll('network_tabs', $arr);
### mod/friendica.php
Addon::callHooks('about_hook', $o);
Hook::callAll('about_hook', $o);
### mod/subthread.php
Addon::callHooks('post_local_end', $arr);
Hook::callAll('post_local_end', $arr);
### mod/profiles.php
Addon::callHooks('profile_post', $_POST);
Addon::callHooks('profile_edit', $arr);
Hook::callAll('profile_post', $_POST);
Hook::callAll('profile_edit', $arr);
### mod/settings.php
Addon::callHooks('addon_settings_post', $_POST);
Addon::callHooks('connector_settings_post', $_POST);
Addon::callHooks('display_settings_post', $_POST);
Addon::callHooks('settings_post', $_POST);
Addon::callHooks('addon_settings', $settings_addons);
Addon::callHooks('connector_settings', $settings_connectors);
Addon::callHooks('display_settings', $o);
Addon::callHooks('settings_form', $o);
Hook::callAll('addon_settings_post', $_POST);
Hook::callAll('connector_settings_post', $_POST);
Hook::callAll('display_settings_post', $_POST);
Hook::callAll('settings_post', $_POST);
Hook::callAll('addon_settings', $settings_addons);
Hook::callAll('connector_settings', $settings_connectors);
Hook::callAll('display_settings', $o);
Hook::callAll('settings_form', $o);
### mod/photos.php
Addon::callHooks('photo_post_init', $_POST);
Addon::callHooks('photo_post_file', $ret);
Addon::callHooks('photo_post_end', $foo);
Addon::callHooks('photo_post_end', $foo);
Addon::callHooks('photo_post_end', $foo);
Addon::callHooks('photo_post_end', $foo);
Addon::callHooks('photo_post_end', intval($item_id));
Addon::callHooks('photo_upload_form', $ret);
Hook::callAll('photo_post_init', $_POST);
Hook::callAll('photo_post_file', $ret);
Hook::callAll('photo_post_end', $foo);
Hook::callAll('photo_post_end', $foo);
Hook::callAll('photo_post_end', $foo);
Hook::callAll('photo_post_end', $foo);
Hook::callAll('photo_post_end', intval($item_id));
Hook::callAll('photo_upload_form', $ret);
### mod/profile.php
Addon::callHooks('profile_advanced', $o);
Hook::callAll('profile_advanced', $o);
### mod/home.php
Addon::callHooks('home_init', $ret);
Addon::callHooks("home_content", $content);
Hook::callAll('home_init', $ret);
Hook::callAll("home_content", $content);
### mod/poke.php
Addon::callHooks('post_local_end', $arr);
Hook::callAll('post_local_end', $arr);
### mod/contacts.php
Addon::callHooks('contact_edit_post', $_POST);
Addon::callHooks('contact_edit', $arr);
Hook::callAll('contact_edit_post', $_POST);
Hook::callAll('contact_edit', $arr);
### mod/tagger.php
Addon::callHooks('post_local_end', $arr);
Hook::callAll('post_local_end', $arr);
### mod/lockview.php
Addon::callHooks('lockview_content', $item);
Hook::callAll('lockview_content', $item);
### mod/uexport.php
Addon::callHooks('uexport_options', $options);
Hook::callAll('uexport_options', $options);
### mod/register.php
Addon::callHooks('register_post', $arr);
Addon::callHooks('register_form', $arr);
Hook::callAll('register_post', $arr);
Hook::callAll('register_form', $arr);
### mod/item.php
Addon::callHooks('post_local_start', $_REQUEST);
Addon::callHooks('post_local', $datarray);
Addon::callHooks('post_local_end', $datarray);
Hook::callAll('post_local_start', $_REQUEST);
Hook::callAll('post_local', $datarray);
Hook::callAll('post_local_end', $datarray);
### mod/editpost.php
Addon::callHooks('jot_tool', $jotplugins);
Hook::callAll('jot_tool', $jotplugins);
### src/Network/FKOAuth1.php
Addon::callHooks('logged_in', $a->user);
Hook::callAll('logged_in', $a->user);
### src/Render/FriendicaSmartyEngine.php
Addon::callHooks("template_vars", $arr);
Hook::callAll("template_vars", $arr);
### src/Model/Item.php
Addon::callHooks('post_local', $item);
Addon::callHooks('post_remote', $item);
Addon::callHooks('post_local_end', $posted_item);
Addon::callHooks('post_remote_end', $posted_item);
Addon::callHooks('tagged', $arr);
Addon::callHooks('post_local_end', $new_item);
Hook::callAll('post_local', $item);
Hook::callAll('post_remote', $item);
Hook::callAll('post_local_end', $posted_item);
Hook::callAll('post_remote_end', $posted_item);
Hook::callAll('tagged', $arr);
Hook::callAll('post_local_end', $new_item);
### src/Model/Contact.php
Addon::callHooks('contact_photo_menu', $args);
Addon::callHooks('follow', $arr);
Hook::callAll('contact_photo_menu', $args);
Hook::callAll('follow', $arr);
### src/Model/Profile.php
Addon::callHooks('profile_sidebar_enter', $profile);
Addon::callHooks('profile_sidebar', $arr);
Addon::callHooks('profile_tabs', $arr);
Addon::callHooks('zrl_init', $arr);
Hook::callAll('profile_sidebar_enter', $profile);
Hook::callAll('profile_sidebar', $arr);
Hook::callAll('profile_tabs', $arr);
Hook::callAll('zrl_init', $arr);
### src/Model/Event.php
Addon::callHooks('event_updated', $event['id']);
Addon::callHooks("event_created", $event['id']);
Hook::callAll('event_updated', $event['id']);
Hook::callAll("event_created", $event['id']);
### src/Model/User.php
Addon::callHooks('register_account', $uid);
Addon::callHooks('remove_user', $user);
Hook::callAll('register_account', $uid);
Hook::callAll('remove_user', $user);
### src/Content/Text/BBCode.php
Addon::callHooks('bbcode', $text);
Addon::callHooks('bb2diaspora', $text);
Hook::callAll('bbcode', $text);
Hook::callAll('bb2diaspora', $text);
### src/Content/Text/HTML.php
Addon::callHooks('html2bbcode', $message);
Hook::callAll('html2bbcode', $message);
### src/Content/Smilies.php
Addon::callHooks('smilie', $params);
Hook::callAll('smilie', $params);
### src/Content/Feature.php
Addon::callHooks('isEnabled', $arr);
Addon::callHooks('get', $arr);
Hook::callAll('isEnabled', $arr);
Hook::callAll('get', $arr);
### src/Content/ContactSelector.php
Addon::callHooks('network_to_name', $nets);
Addon::callHooks('gender_selector', $select);
Addon::callHooks('sexpref_selector', $select);
Addon::callHooks('marital_selector', $select);
Hook::callAll('network_to_name', $nets);
Hook::callAll('gender_selector', $select);
Hook::callAll('sexpref_selector', $select);
Hook::callAll('marital_selector', $select);
### src/Content/OEmbed.php
Addon::callHooks('oembed_fetch_url', $embedurl, $j);
Hook::callAll('oembed_fetch_url', $embedurl, $j);
### src/Content/Nav.php
Addon::callHooks('page_header', $a->page['nav']);
Addon::callHooks('nav_info', $nav);
Hook::callAll('page_header', $a->page['nav']);
Hook::callAll('nav_info', $nav);
### src/Core/Authentication.php
Addon::callHooks('logged_in', $a->user);
Hook::callAll('logged_in', $a->user);
### src/Worker/Directory.php
Addon::callHooks('globaldir_update', $arr);
Hook::callAll('globaldir_update', $arr);
### src/Worker/Notifier.php
Addon::callHooks('notifier_end', $target_item);
Hook::callAll('notifier_end', $target_item);
### src/Worker/Queue.php
Addon::callHooks('queue_predeliver', $r);
Addon::callHooks('queue_deliver', $params);
Hook::callAll('queue_predeliver', $r);
Hook::callAll('queue_deliver', $params);
### src/Module/Login.php
Addon::callHooks('authenticate', $addon_auth);
Addon::callHooks('login_hook', $o);
Hook::callAll('authenticate', $addon_auth);
Hook::callAll('login_hook', $o);
### src/Module/Logout.php
Addon::callHooks("logging_out");
Hook::callAll("logging_out");
### src/Object/Post.php
Addon::callHooks('render_location', $locate);
Addon::callHooks('display_item', $arr);
Hook::callAll('render_location', $locate);
Hook::callAll('display_item', $arr);
### src/Core/ACL.php
Addon::callHooks('contact_select_options', $x);
Addon::callHooks($a->module.'_pre_'.$selname, $arr);
Addon::callHooks($a->module.'_post_'.$selname, $o);
Addon::callHooks($a->module.'_pre_'.$selname, $arr);
Addon::callHooks($a->module.'_post_'.$selname, $o);
Addon::callHooks('jot_networks', $jotnets);
Hook::callAll('contact_select_options', $x);
Hook::callAll($a->module.'_pre_'.$selname, $arr);
Hook::callAll($a->module.'_post_'.$selname, $o);
Hook::callAll($a->module.'_pre_'.$selname, $arr);
Hook::callAll($a->module.'_post_'.$selname, $o);
Hook::callAll('jot_networks', $jotnets);
### src/Core/Worker.php
Addon::callHooks("proc_run", $arr);
Hook::callAll("proc_run", $arr);
### src/Util/Emailer.php
Addon::callHooks('emailer_send_prepare', $params);
Addon::callHooks("emailer_send", $hookdata);
Hook::callAll('emailer_send_prepare', $params);
Hook::callAll("emailer_send", $hookdata);
### src/Util/Map.php
Addon::callHooks('generate_map', $arr);
Addon::callHooks('generate_named_map', $arr);
Addon::callHooks('Map::getCoordinates', $arr);
Hook::callAll('generate_map', $arr);
Hook::callAll('generate_named_map', $arr);
Hook::callAll('Map::getCoordinates', $arr);
### src/Util/Network.php
Addon::callHooks('avatar_lookup', $avatar);
Hook::callAll('avatar_lookup', $avatar);
### src/Util/ParseUrl.php
Addon::callHooks("getsiteinfo", $siteinfo);
Hook::callAll("getsiteinfo", $siteinfo);
### src/Protocol/DFRN.php
Addon::callHooks('atom_feed_end', $atom);
Addon::callHooks('atom_feed_end', $atom);
Hook::callAll('atom_feed_end', $atom);
Hook::callAll('atom_feed_end', $atom);

+ 4
- 4
include/api.php View File

@ -11,9 +11,9 @@ use Friendica\Content\ContactSelector;
use Friendica\Content\Feature;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
use Friendica\Core\Addon;
use Friendica\Core\Authentication;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\NotificationsManager;
@ -174,7 +174,7 @@ function api_login(App $a)
list($consumer, $token) = $oauth1->verify_request($request);
if (!is_null($token)) {
$oauth1->loginUser($token->uid);
Addon::callHooks('logged_in', $a->user);
Hook::callAll('logged_in', $a->user);
return;
}
echo __FILE__.__LINE__.__FUNCTION__ . "<pre>";
@ -224,7 +224,7 @@ function api_login(App $a)
* Addons should never set 'authenticated' except to indicate success - as hooks may be chained
* and later addons should not interfere with an earlier one that succeeded.
*/
Addon::callHooks('authenticate', $addon_auth);
Hook::callAll('authenticate', $addon_auth);
if ($addon_auth['authenticated'] && count($addon_auth['user_record'])) {
$record = $addon_auth['user_record'];
@ -247,7 +247,7 @@ function api_login(App $a)
$_SESSION["allow_api"] = true;
Addon::callHooks('logged_in', $a->user);
Hook::callAll('logged_in', $a->user);
}
/**


+ 7
- 7
include/conversation.php View File

@ -8,8 +8,8 @@ use Friendica\Content\ContactSelector;
use Friendica\Content\Feature;
use Friendica\Content\Pager;
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\PConfig;
@ -543,7 +543,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
}
$cb = ['items' => $items, 'mode' => $mode, 'update' => $update, 'preview' => $preview];
Addon::callHooks('conversation_start',$cb);
Hook::callAll('conversation_start',$cb);
$items = $cb['items'];
@ -615,7 +615,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
}
$locate = ['location' => $item['location'], 'coord' => $item['coord'], 'html' => ''];
Addon::callHooks('render_location',$locate);
Hook::callAll('render_location',$locate);
$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
@ -706,7 +706,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
];
$arr = ['item' => $item, 'output' => $tmp_item];
Addon::callHooks('display_item', $arr);
Hook::callAll('display_item', $arr);
$threads[$threadsid]['id'] = $item['id'];
$threads[$threadsid]['network'] = $item['network'];
@ -743,7 +743,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
/// @todo Check if this call is needed or not
$arr = ['item' => $item];
Addon::callHooks('display_item', $arr);
Hook::callAll('display_item', $arr);
$item['pagedrop'] = $page_dropping;
@ -892,7 +892,7 @@ function item_photo_menu($item) {
$args = ['item' => $item, 'menu' => $menu];
Addon::callHooks('item_photo_menu', $args);
Hook::callAll('item_photo_menu', $args);
$menu = $args['menu'];
@ -1097,7 +1097,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
]);
$jotplugins = '';
Addon::callHooks('jot_tool', $jotplugins);
Hook::callAll('jot_tool', $jotplugins);
// Private/public post links for the non-JS ACL form
$private_post = 1;


+ 5
- 5
include/enotify.php View File

@ -4,8 +4,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;
@ -441,7 +441,7 @@ function notification($params)
'itemlink' => $itemlink
];
Addon::callHooks('enotify', $h);
Hook::callAll('enotify', $h);
$subject = $h['subject'];
@ -481,7 +481,7 @@ function notification($params)
$datarray['otype'] = $params['otype'];
$datarray['abort'] = false;
Addon::callHooks('enotify_store', $datarray);
Hook::callAll('enotify_store', $datarray);
if ($datarray['abort']) {
L10n::popLang();
@ -584,7 +584,7 @@ function notification($params)
$datarray['subject'] = $subject;
$datarray['headers'] = $additional_mail_header;
Addon::callHooks('enotify_mail', $datarray);
Hook::callAll('enotify_mail', $datarray);
// check whether sending post content in email notifications is allowed
// always true for SYSTEM_EMAIL
@ -677,7 +677,7 @@ function check_user_notification($itemid) {
*/
function check_item_notification($itemid, $uid, $defaulttype = "") {
$notification_data = ["uid" => $uid, "profiles" => []];
Addon::callHooks('check_item_notification', $notification_data);
Hook::callAll('check_item_notification', $notification_data);
$profiles = $notification_data["profiles"];


+ 2
- 2
include/items.php View File

@ -5,8 +5,8 @@
use Friendica\BaseObject;
use Friendica\Content\Feature;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -27,7 +27,7 @@ use Friendica\Util\Temporal;
require_once 'mod/share.php';
function add_page_info_data(array $data, $no_photos = false)
{
Addon::callHooks('page_info_data', $data);
Hook::callAll('page_info_data', $data);
if (empty($data['type'])) {
return '';


+ 2
- 2
mod/acl.php View File

@ -5,7 +5,7 @@
use Friendica\App;
use Friendica\Content\Widget;
use Friendica\Core\ACL;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
@ -305,7 +305,7 @@ function acl_content(App $a)
'search' => $search,
];
Addon::callHooks('acl_lookup_end', $results);
Hook::callAll('acl_lookup_end', $results);
$o = [
'tot' => $results['tot'],


+ 2
- 2
mod/directory.php View File

@ -7,8 +7,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;
@ -190,7 +190,7 @@ function directory_content(App $a)
$arr = ['contact' => $rr, 'entry' => $entry];
Addon::callHooks('directory_item', $arr);
Hook::callAll('directory_item', $arr);
unset($profile);
unset($location);


+ 0
- 1
mod/editpost.php View File

@ -4,7 +4,6 @@
*/
use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;


+ 2
- 1
mod/friendica.php View File

@ -6,6 +6,7 @@
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBA;
@ -126,7 +127,7 @@ function friendica_content(App $a)
$o .= '</tbody></table></div>' . PHP_EOL;
}
Addon::callHooks('about_hook', $o);
Hook::callAll('about_hook', $o);
return $o;
}

+ 3
- 3
mod/home.php View File

@ -3,8 +3,8 @@
* @file mod/home.php
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Core\System;
@ -14,7 +14,7 @@ if(! function_exists('home_init')) {
function home_init(App $a) {
$ret = [];
Addon::callHooks('home_init',$ret);
Hook::callAll('home_init',$ret);
if (local_user() && ($a->user['nickname'])) {
$a->internalRedirect('network');
@ -51,7 +51,7 @@ function home_content(App $a) {
$login = Login::form($a->query_string, intval(Config::get('config', 'register_policy')) === REGISTER_CLOSED ? 0 : 1);
$content = '';
Addon::callHooks("home_content",$content);
Hook::callAll("home_content",$content);
$tpl = Renderer::getMarkupTemplate('home.tpl');


+ 4
- 4
mod/item.php View File

@ -19,8 +19,8 @@ use Friendica\App;
use Friendica\Content\Pager;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
@ -54,7 +54,7 @@ function item_post(App $a) {
exit();
}
Addon::callHooks('post_local_start', $_REQUEST);
Hook::callAll('post_local_start', $_REQUEST);
Logger::log('postvars ' . print_r($_REQUEST, true), Logger::DATA);
@ -679,7 +679,7 @@ function item_post(App $a) {
exit();
}
Addon::callHooks('post_local',$datarray);
Hook::callAll('post_local',$datarray);
if (!empty($datarray['cancel'])) {
Logger::log('mod_item: post cancelled by addon.');
@ -795,7 +795,7 @@ function item_post(App $a) {
}
}
Addon::callHooks('post_local_end', $datarray);
Hook::callAll('post_local_end', $datarray);
if (strlen($emailcc) && $profile_uid == local_user()) {
$erecips = explode(',', $emailcc);


+ 2
- 2
mod/lockview.php View File

@ -3,7 +3,7 @@
* @file mod/lockview.php
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Database\DBA;
use Friendica\Model\Item;
@ -40,7 +40,7 @@ function lockview_content(App $a)
exit();
}
Addon::callHooks('lockview_content', $item);
Hook::callAll('lockview_content', $item);
if ($item['uid'] != local_user()) {
echo L10n::t('Remote privacy information not available.') . '<br />';


+ 2
- 3
mod/manage.php View File

@ -4,10 +4,9 @@
*/
use Friendica\App;
use Friendica\Core\Authentication;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\Database\DBA;
function manage_post(App $a) {
@ -116,7 +115,7 @@ function manage_post(App $a) {
}
$ret = [];
Addon::callHooks('home_init',$ret);
Hook::callAll('home_init',$ret);
$a->internalRedirect('profile/' . $a->user['nickname'] );
// NOTREACHED


+ 2
- 3
mod/network.php View File

@ -12,7 +12,6 @@ use Friendica\Content\Pager;
use Friendica\Content\Widget;
use Friendica\Content\Text\HTML;
use Friendica\Core\ACL;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
@ -355,7 +354,7 @@ function network_content(App $a, $update = 0, $parent = 0)
/// @TODO Is this really necessary? $a is already available to hooks
$arr = ['query' => $a->query_string];
Addon::callHooks('network_content_init', $arr);
Hook::callAll('network_content_init', $arr);
$flat_mode = false;
@ -1024,7 +1023,7 @@ function network_tabs(App $a)
}
$arr = ['tabs' => $tabs];
Addon::callHooks('network_tabs', $arr);
Hook::callAll('network_tabs', $arr);
$tpl = Renderer::getMarkupTemplate('common_tabs.tpl');


+ 2
- 2
mod/parse_url.php View File

@ -10,7 +10,7 @@
* @see ParseUrl::getSiteinfo() for more information about scraping embeddable content
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Util\Network;
use Friendica\Util\ParseUrl;
@ -97,7 +97,7 @@ function parse_url_content(App $a)
$arr = ['url' => $url, 'text' => ''];
Addon::callHooks('parse_link', $arr);
Hook::callAll('parse_link', $arr);
if (strlen($arr['text'])) {
echo $arr['text'];


+ 9
- 10
mod/photos.php View File

@ -9,13 +9,12 @@ use Friendica\Content\Nav;
use Friendica\Content\Pager;
use Friendica\Content\Text\BBCode;
use Friendica\Core\ACL;
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\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
use Friendica\Model\Group;
@ -666,7 +665,7 @@ function photos_post(App $a)
// default post action - upload a photo
Addon::callHooks('photo_post_init', $_POST);
Hook::callAll('photo_post_init', $_POST);
// Determine the album to use
$album = !empty($_REQUEST['album']) ? Strings::escapeTags(trim($_REQUEST['album'])) : '';
@ -714,7 +713,7 @@ function photos_post(App $a)
$ret = ['src' => '', 'filename' => '', 'filesize' => 0, 'type' => ''];
Addon::callHooks('photo_post_file', $ret);
Hook::callAll('photo_post_file', $ret);
if (!empty($ret['src']) && !empty($ret['filesize'])) {
$src = $ret['src'];
@ -754,7 +753,7 @@ function photos_post(App $a)
}
@unlink($src);
$foo = 0;
Addon::callHooks('photo_post_end', $foo);
Hook::callAll('photo_post_end', $foo);
return;
}
@ -770,7 +769,7 @@ function photos_post(App $a)
notice(L10n::t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize)) . EOL);
@unlink($src);
$foo = 0;
Addon::callHooks('photo_post_end', $foo);
Hook::callAll('photo_post_end', $foo);
return;
}
@ -778,7 +777,7 @@ function photos_post(App $a)
notice(L10n::t('Image file is empty.') . EOL);
@unlink($src);
$foo = 0;
Addon::callHooks('photo_post_end', $foo);
Hook::callAll('photo_post_end', $foo);
return;
}
@ -793,7 +792,7 @@ function photos_post(App $a)
notice(L10n::t('Unable to process image.') . EOL);
@unlink($src);
$foo = 0;
Addon::callHooks('photo_post_end',$foo);
Hook::callAll('photo_post_end',$foo);
exit();
}
@ -879,7 +878,7 @@ function photos_post(App $a)
// Update the photo albums cache
Photo::clearAlbumCache($page_owner_uid);
Addon::callHooks('photo_post_end', $item_id);
Hook::callAll('photo_post_end', $item_id);
// addon uploaders should call "killme()" [e.g. exit] within the photo_post_end hook
// if they do not wish to be redirected
@ -1042,7 +1041,7 @@ function photos_content(App $a)
'addon_text' => $uploader,
'default_upload' => true];
Addon::callHooks('photo_upload_form',$ret);
Hook::callAll('photo_upload_form',$ret);
$default_upload_box = Renderer::replaceMacros(Renderer::getMarkupTemplate('photos_default_uploader_box.tpl'), []);
$default_upload_submit = Renderer::replaceMacros(Renderer::getMarkupTemplate('photos_default_uploader_submit.tpl'), [


+ 2
- 3
mod/ping.php View File

@ -4,12 +4,11 @@
*/
use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Content\ForumManager;
use Friendica\Content\Text\BBCode;
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\System;
@ -129,7 +128,7 @@ function ping_init(App $a)
if (DBA::isResult($items)) {
$items_unseen = Item::inArray($items);
$arr = ['items' => $items_unseen];
Addon::callHooks('network_ping', $arr);
Hook::callAll('network_ping', $arr);
foreach ($items_unseen as $item) {
if ($item['wall']) {


+ 3
- 7
mod/poke.php View File

@ -14,12 +14,11 @@
*/
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\Model\Item;
use Friendica\Util\Strings;
@ -129,9 +128,9 @@ function poke_init(App $a)
$arr['object'] .= XML::escape('<link rel="photo" type="image/jpeg" href="' . $target['photo'] . '" />' . "\n");
$arr['object'] .= '</link></object>' . "\n";
$item_id = Item::insert($arr);
Item::insert($arr);
Addon::callHooks('post_local_end', $arr);
Hook::callAll('post_local_end', $arr);
return;
}
@ -143,9 +142,6 @@ function poke_content(App $a)
return;
}
$name = '';
$id = '';
if (empty($_GET['c'])) {
return;
}


+ 2
- 3
mod/profile.php View File

@ -8,10 +8,9 @@ use Friendica\Content\Nav;
use Friendica\Content\Pager;
use Friendica\Content\Widget;
use Friendica\Core\ACL;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBA;
@ -167,7 +166,7 @@ function profile_content(App $a, $update = 0)
if ($tab === 'profile') {
$o .= Profile::getAdvanced($a);
Addon::callHooks('profile_advanced', $o);
Hook::callAll('profile_advanced', $o);
return $o;
}


+ 3
- 3
mod/profiles.php View File

@ -8,8 +8,8 @@ use Friendica\BaseModule;
use Friendica\Content\ContactSelector;
use Friendica\Content\Feature;
use Friendica\Content\Nav;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
@ -186,7 +186,7 @@ function profiles_post(App $a) {
$namechanged = false;
Addon::callHooks('profile_post', $_POST);
Hook::callAll('profile_post', $_POST);
if (($a->argc > 1) && ($a->argv[1] !== "new") && intval($a->argv[1])) {
$orig = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
@ -645,7 +645,7 @@ function profiles_content(App $a) {
]);
$arr = ['profile' => $r[0], 'entry' => $o];
Addon::callHooks('profile_edit', $arr);
Hook::callAll('profile_edit', $arr);
return $o;
} else {


+ 3
- 3
mod/register.php View File

@ -6,8 +6,8 @@
use Friendica\App;
use Friendica\BaseModule;
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\PConfig;
@ -26,7 +26,7 @@ function register_post(App $a)
$blocked = 1;
$arr = ['post' => $_POST];
Addon::callHooks('register_post', $arr);
Hook::callAll('register_post', $arr);
$max_dailies = intval(Config::get('system', 'max_daily_registrations'));
if ($max_dailies) {
@ -241,7 +241,7 @@ function register_content(App $a)
$arr = ['template' => $tpl];
Addon::callHooks('register_form', $arr);
Hook::callAll('register_form', $arr);
$tpl = $arr['template'];


+ 9
- 9
mod/settings.php View File

@ -8,8 +8,8 @@ use Friendica\BaseModule;
use Friendica\Content\Feature;
use Friendica\Content\Nav;
use Friendica\Core\ACL;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
@ -215,7 +215,7 @@ function settings_post(App $a)
if (($a->argc