X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=randplace%2Frandplace.php;h=ffc3237c3d007f129d907e0256df9a423fe7d079;hb=101d3603245b17bd2e6d4880e94bb27887257238;hp=019d6f7666318803f8959709f13ab008ec481d83;hpb=a8282d143e43eaab9239c472fd42a5ecbf957d0d;p=friendica-addons.git diff --git a/randplace/randplace.php b/randplace/randplace.php index 019d6f76..ffc3237c 100644 --- a/randplace/randplace.php +++ b/randplace/randplace.php @@ -18,8 +18,9 @@ * system will call the name_uninstall() function. * */ -use Friendica\Core\Addon; +use Friendica\Core\Hook; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; function randplace_install() { @@ -31,7 +32,7 @@ function randplace_install() { * */ - Addon::registerHook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook'); + Hook::register('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook'); /** * @@ -41,10 +42,10 @@ function randplace_install() { * */ - Addon::registerHook('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings'); - Addon::registerHook('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); + Hook::register('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings'); + Hook::register('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); - logger("installed randplace"); + Logger::log("installed randplace"); } @@ -58,12 +59,12 @@ function randplace_uninstall() { * */ - Addon::unregisterHook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook'); - Addon::unregisterHook('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings'); - Addon::unregisterHook('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); + Hook::unregister('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook'); + Hook::unregister('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings'); + Hook::unregister('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); - logger("removed randplace"); + Logger::log("removed randplace"); } @@ -79,7 +80,7 @@ function randplace_post_hook($a, &$item) { * */ - logger('randplace invoked'); + Logger::log('randplace invoked'); if(! local_user()) /* non-zero if this is a logged in user of this system */ return;