]> 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 4f26002719dcb1fabd5f143dddfce320d7ee3d3b..69dfa5cda1bbccc41f1c2f78f3b443b9e0484c03 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
 use Friendica\App;
+use Friendica\Core\System;
+use Friendica\Core\Worker;
 
 require_once("include/diaspora.php");
 
@@ -165,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;
@@ -183,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
@@ -200,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),
@@ -252,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;
 }