Code beautification and some more logging data - no changes in the functionality.
This commit is contained in:
parent
12866209e8
commit
5f3d584716
3 changed files with 48 additions and 48 deletions
13
mod/like.php
13
mod/like.php
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue