]> git.mxchange.org Git - friendica.git/blobdiff - include/like.php
Merge pull request #3044 from rabuzarus/20161224_-_update_perfect_scrollbar
[friendica.git] / include / like.php
index feaffe011b7ec7842e24acd1054701fe0e45630d..893047da3c252f9d6216c4271f87735d9b162f26 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,8 +107,7 @@ 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)
@@ -166,6 +163,7 @@ function do_like($item_id, $verb) {
        $post_type = (($item['resource-id']) ? t('photo') : t('status'));
        if ($item['object-type'] === ACTIVITY_OBJ_EVENT) {
                $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['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
        $body = $item['body'];
@@ -248,7 +246,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;