dbesc($item_id)
);
- if(! $item_id || (! count($r))) {
+ if(! $item_id || (! dbm::is_result($r))) {
logger('like: no item ' . $item_id);
return false;
}
intval($item['contact-id']),
intval($item['uid'])
);
- if(! count($r))
+ if(! dbm::is_result($r))
return false;
if(! $r[0]['self'])
$remote_owner = $r[0];
WHERE `contact`.`self` = 1 AND `contact`.`uid` = %d LIMIT 1",
intval($owner_uid)
);
- if(count($r))
+ if (dbm::is_result($r))
$owner = $r[0];
if(! $owner) {
intval($_SESSION['visitor_id']),
intval($owner_uid)
);
- if(count($r))
+ if (dbm::is_result($r))
$contact = $r[0];
}
if(! $contact) {
dbesc($item_id), dbesc($item_id), dbesc($item['uri'])
);
- if(count($r)) {
+ if (dbm::is_result($r)) {
$like_item = $r[0];
// Already voted, undo it