dbesc($owner_nick)
);
- if(! count($r))
+ if(! dbm::is_result($r))
killme();
$owner = $r[0];
intval($owner_id)
);
- if(! count($r))
+ if(! dbm::is_result($r))
killme();
$contact = $r[0];
dbesc(normalise_link($suggest["url"])),
intval($suggest["uid"])
);
- if(count($r))
+ if (dbm::is_result($r))
return false;
// Do we already have an fcontact record for this person?
dbesc($suggest["name"]),
dbesc($suggest["request"])
);
- if(count($r)) {
+ if (dbm::is_result($r)) {
$fid = $r[0]["id"];
// OK, we do. Do we already have an introduction for this person ?
intval($suggest["uid"]),
intval($fid)
);
- if(count($r))
+ if (dbm::is_result($r))
return false;
}
if(!$fid)
dbesc($suggest["name"]),
dbesc($suggest["request"])
);
- if(count($r))
+ if (dbm::is_result($r))
$fid = $r[0]["id"];
else
// database record did not get created. Quietly give up.
LIMIT 1",
dbesc($item["parent-uri"])
);
- if($r && count($r)) {
+ if (dbm::is_result($r)) {
$r = q("SELECT `item`.`forum_mode`, `item`.`wall` FROM `item`
INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' OR `item`.`thr-parent` = '%s')
dbesc($r[0]["parent-uri"]),
intval($importer["importer_uid"])
);
- if($r && count($r))
+ if (dbm::is_result($r))
$is_a_remote_action = true;
}
dbesc($item["verb"]),
dbesc($item["parent-uri"])
);
- if($r && count($r))
+ if (dbm::is_result($r))
return false;
$r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `author-link` = '%s' AND `verb` = '%s' AND `thr-parent` = '%s' AND NOT `deleted` LIMIT 1",
dbesc($item["verb"]),
dbesc($item["parent-uri"])
);
- if($r && count($r))
+ if (dbm::is_result($r))
return false;
} else
$is_like = false;
intval($importer["importer_uid"])
);
- if(!count($r))
+ if (!dbm::is_result($r))
return false;
// extract tag, if not duplicate, add to parent item
dbesc($item["uri"]),
intval($importer["uid"])
);
- if(count($r))
+ if (dbm::is_result($r))
$ev["id"] = $r[0]["id"];
$event_id = event_store($ev);
}
// Update content if 'updated' changes
- if(count($r)) {
+ if (dbm::is_result($r)) {
if (self::update_content($r[0], $item, $importer, $entrytype))
logger("Item ".$item["uri"]." was updated.", LOGGER_DEBUG);
else
intval($posted_id),
intval($importer["importer_uid"])
);
- if(count($r)) {
+ if (dbm::is_result($r)) {
$parent = $r[0]["parent"];
$parent_uri = $r[0]["parent-uri"];
}
intval($importer["uid"]),
intval($importer["id"])
);
- if(!count($r)) {
+ if (!dbm::is_result($r)) {
logger("Item with uri ".$uri." from contact ".$importer["id"]." for user ".$importer["uid"]." wasn't found.", LOGGER_DEBUG);
return;
} else {
dbesc($item["parent-uri"]),
intval($importer["uid"])
);
- if(count($r)) {
+ if (dbm::is_result($r)) {
q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d",
intval($r[0]["id"])
);