]> git.mxchange.org Git - friendica.git/blobdiff - include/like.php
Without only the worker queue we don't need the deliverq anymore.
[friendica.git] / include / like.php
index 94ff33a6996f4dd204993923117d9e17fe072fa1..210bde690656e84e777c0b6771dc6ee57f867939 100644 (file)
@@ -48,10 +48,8 @@ function do_like($item_id, $verb) {
                        break;
        }
 
-
        logger('like: verb ' . $verb . ' item ' . $item_id);
 
-
        $r = q("SELECT * FROM `item` WHERE `id` = '%s' OR `uri` = '%s' LIMIT 1",
                dbesc($item_id),
                dbesc($item_id)
@@ -109,14 +107,14 @@ function do_like($item_id, $verb) {
 
        if ((local_user()) && (local_user() == $owner_uid)) {
                $contact = $owner;
-       }
-       else {
+       } else {
                $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                        intval($_SESSION['visitor_id']),
                        intval($owner_uid)
                );
-               if (dbm::is_result($r))
+               if (dbm::is_result($r)) {
                        $contact = $r[0];
+               }
        }
        if (! $contact) {
                return false;
@@ -249,7 +247,7 @@ EOT;
 
 
        // Save the author information for the like in case we need to relay to Diaspora
-       diaspora::store_like_signature($contact, $post_id);
+       Diaspora::store_like_signature($contact, $post_id);
 
        $arr['id'] = $post_id;