X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=randplace%2Frandplace.php;h=ffc3237c3d007f129d907e0256df9a423fe7d079;hb=101d3603245b17bd2e6d4880e94bb27887257238;hp=abf59e2dffd1ab852041109a4734092ede016311;hpb=8f7503d573ad90e8150b1f288b5e9c09f9479c2a;p=friendica-addons.git diff --git a/randplace/randplace.php b/randplace/randplace.php index abf59e2d..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; @@ -157,7 +158,7 @@ function randplace_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */