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

@ -5,6 +5,7 @@
namespace Friendica\Model;
use Friendica\BaseObject;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\System;
@ -559,7 +560,7 @@ class Contact extends BaseObject
$args = ['contact' => $contact, 'menu' => &$menu];
call_hooks('contact_photo_menu', $args);
Addon::callHooks('contact_photo_menu', $args);
$menucondensed = [];
@ -1146,7 +1147,7 @@ class Contact extends BaseObject
$arr = ['url' => $url, 'contact' => []];
call_hooks('follow', $arr);
Addon::callHooks('follow', $arr);
if (x($arr['contact'], 'name')) {
$ret = $arr['contact'];

View file

@ -8,6 +8,7 @@ namespace Friendica\Model;
use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Content\ForumManager;
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
@ -286,7 +287,7 @@ class Profile
$profile['network_name'] = '';
}
call_hooks('profile_sidebar_enter', $profile);
Addon::callHooks('profile_sidebar_enter', $profile);
// don't show connect link to yourself
@ -520,7 +521,7 @@ class Profile
$arr = ['profile' => &$profile, 'entry' => &$o];
call_hooks('profile_sidebar', $arr);
Addon::callHooks('profile_sidebar', $arr);
return $o;
}
@ -939,7 +940,7 @@ class Profile
}
$arr = ['is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => $tab, 'tabs' => $tabs];
call_hooks('profile_tabs', $arr);
Addon::callHooks('profile_tabs', $arr);
$tpl = get_markup_template('common_tabs.tpl');
@ -976,7 +977,7 @@ class Profile
Worker::add(PRIORITY_LOW, 'GProbe', $my_url);
$arr = ['zrl' => $my_url, 'url' => $a->cmd];
call_hooks('zrl_init', $arr);
Addon::callHooks('zrl_init', $arr);
}
}

View file

@ -7,6 +7,7 @@
namespace Friendica\Model;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\System;
@ -433,7 +434,7 @@ class User
}
}
call_hooks('register_account', $uid);
Addon::callHooks('register_account', $uid);
$return['user'] = $user;
return $return;
@ -532,7 +533,7 @@ class User
$user = dba::selectFirst('user', [], ['uid' => $uid]);
call_hooks('remove_user', $user);
Addon::callHooks('remove_user', $user);
// save username (actually the nickname as it is guaranteed
// unique), so it cannot be re-registered in the future.