]> git.mxchange.org Git - friendica.git/blobdiff - mod/like.php
Merge pull request #1000 from fabrixxm/master
[friendica.git] / mod / like.php
index ed6b1e7d08985fcdc256ffdce4fa04d011dfc549..a2f51b074eecb07e07d701531cba42d418394aa6 100755 (executable)
@@ -109,14 +109,13 @@ function like_content(&$a) {
        $return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
 
 
-       $r = q("SELECT * FROM `item` WHERE `verb` = '%s' AND `deleted` = 0
-               AND `contact-id` = %d AND ( `parent` = '%s' OR `parent-uri` = '%s' OR `thr-parent` = '%s') LIMIT 1",
-               dbesc($activity),
-               intval($contact['id']),
-               dbesc($item_id),
-               dbesc($item_id),
-               dbesc($item['uri'])
+       $r = q("SELECT `id`, `guid` FROM `item` WHERE `verb` = '%s' AND `deleted` = 0
+               AND `contact-id` = %d AND `uid` = %d
+               AND (`parent` = '%s' OR `parent-uri` = '%s' OR `thr-parent` = '%s') LIMIT 1",
+               dbesc($activity), intval($contact['id']), intval($owner_uid),
+               dbesc($item_id), dbesc($item_id), dbesc($item['uri'])
        );
+
        if(count($r)) {
                $like_item = $r[0];