]> git.mxchange.org Git - friendica-addons.git/blobdiff - randplace/randplace.php
superblock EN-GB translation THX AndyH3
[friendica-addons.git] / randplace / randplace.php
index abf59e2dffd1ab852041109a4734092ede016311..ffc3237c3d007f129d907e0256df9a423fe7d079 100644 (file)
@@ -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'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->get_baseurl() . '/addon/randplace/randplace.css' . '" media="all" />' . "\r\n";
+       $a->page['htmlhead'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->getBaseURL() . '/addon/randplace/randplace.css' . '" media="all" />' . "\r\n";
 
        /* Get the current state of our config variable */