]> git.mxchange.org Git - friendica.git/blobdiff - include/like.php
Merge pull request #3879 from zeroadam/Remove-Includes-#3873
[friendica.git] / include / like.php
index a53b90c0398ce11f215ad1b9d660eb6fbf0c2c01..69dfa5cda1bbccc41f1c2f78f3b443b9e0484c03 100644 (file)
@@ -1,4 +1,9 @@
 <?php
+
+use Friendica\App;
+use Friendica\Core\System;
+use Friendica\Core\Worker;
+
 require_once("include/diaspora.php");
 
 /**
@@ -162,7 +167,7 @@ function do_like($item_id, $verb) {
                );
 
                $like_item_id = $like_item['id'];
-               proc_run(PRIORITY_HIGH, "include/notifier.php", "like", $like_item_id);
+               Worker::add(PRIORITY_HIGH, "notifier", "like", $like_item_id);
 
                if (!$event_verb_flag || $like_item['verb'] == $activity) {
                        return true;
@@ -180,7 +185,7 @@ function do_like($item_id, $verb) {
                $post_type = t('event');
        }
        $objtype = $item['resource-id'] ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE ;
-       $link = xmlify('<link rel="alternate" type="text/html" href="' . App::get_baseurl() . '/display/' . $owner_self_contact['nick'] . '/' . $item['id'] . '" />' . "\n") ;
+       $link = xmlify('<link rel="alternate" type="text/html" href="' . System::baseUrl() . '/display/' . $owner_self_contact['nick'] . '/' . $item['id'] . '" />' . "\n") ;
        $body = $item['body'];
 
        $obj = <<< EOT
@@ -197,7 +202,7 @@ EOT;
 
        $ulink = '[url=' . $author_contact['url'] . ']' . $author_contact['name'] . '[/url]';
        $alink = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
-       $plink = '[url=' . App::get_baseurl() . '/display/' . $owner_self_contact['nick'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
+       $plink = '[url=' . System::baseUrl() . '/display/' . $owner_self_contact['nick'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
 
        $new_item = array(
                'guid'          => get_guid(32),
@@ -249,7 +254,7 @@ EOT;
 
        call_hooks('post_local_end', $new_item);
 
-       proc_run(PRIORITY_HIGH, "include/notifier.php", "like", $new_item_id);
+       Worker::add(PRIORITY_HIGH, "notifier", "like", $new_item_id);
 
        return true;
 }