Update Addon functions and calls

Update function names and calls for Addon class.
This commit is contained in:
Adam Magness 2018-01-17 13:42:40 -05:00
parent 213f6ae1a1
commit 11cf36105c
73 changed files with 544 additions and 464 deletions

View file

@ -4,6 +4,7 @@
*/
use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
@ -157,7 +158,7 @@ function title_is_body($title, $body) {
}
function add_page_info_data($data) {
call_hooks('page_info_data', $data);
Addon::callHooks('page_info_data', $data);
// It maybe is a rich content, but if it does have everything that a link has,
// then treat it that way
@ -943,9 +944,9 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
put_item_in_cache($arr);
if ($notify) {
call_hooks('post_local', $arr);
Addon::callHooks('post_local', $arr);
} else {
call_hooks('post_remote', $arr);
Addon::callHooks('post_remote', $arr);
}
// This array field is used to trigger some automatic reactions
@ -1086,9 +1087,9 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
$r = q('SELECT * FROM `item` WHERE `id` = %d', intval($current_post));
if ((DBM::is_result($r)) && (count($r) == 1)) {
if ($notify) {
call_hooks('post_local_end', $r[0]);
Addon::callHooks('post_local_end', $r[0]);
} else {
call_hooks('post_remote_end', $r[0]);
Addon::callHooks('post_remote_end', $r[0]);
}
} else {
logger('item_store: new item not found in DB, id ' . $current_post);
@ -1364,7 +1365,7 @@ function tag_deliver($uid, $item_id)
$arr = ['item' => $item, 'user' => $u[0], 'contact' => $r[0]];
call_hooks('tagged', $arr);
Addon::callHooks('tagged', $arr);
if ((! $community_page) && (! $prvgroup)) {
return;