X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Flike.php;h=793ea04215e62b0be9607b667d70373c7f5ce7fd;hb=b3e6a1d2832be024819328e51e9e1df4c25b560f;hp=a53b90c0398ce11f215ad1b9d660eb6fbf0c2c01;hpb=187a81f159c26faa0b135a38a655de019f99d337;p=friendica.git diff --git a/include/like.php b/include/like.php index a53b90c039..793ea04215 100644 --- a/include/like.php +++ b/include/like.php @@ -1,5 +1,11 @@ $like_item['id'])); $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 +189,7 @@ function do_like($item_id, $verb) { $post_type = t('event'); } $objtype = $item['resource-id'] ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE ; - $link = xmlify('' . "\n") ; + $link = xmlify('' . "\n") ; $body = $item['body']; $obj = <<< EOT @@ -197,7 +206,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), @@ -236,20 +245,19 @@ EOT; // @todo: Explain this block if (! $item['visible']) { - q("UPDATE `item` SET `visible` = 1 WHERE `id` = %d AND `uid` = %d", - intval($item['id']), - intval($item['uid']) + q("UPDATE `item` SET `visible` = 1 WHERE `id` = %d", + intval($item['id']) ); } // Save the author information for the like in case we need to relay to Diaspora - Diaspora::store_like_signature($item_contact, $new_item_id); + Diaspora::storeLikeSignature($item_contact, $new_item_id); $new_item['id'] = $new_item_id; 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; }