$r = q("SELECT `user`.*, `contact`.`id` FROM `user` LEFT JOIN `contact` on `user`.`uid` = `contact`.`uid` WHERE `user`.`nickname` = '%s' AND `user`.`blocked` = 0 and `contact`.`self` = 1 LIMIT 1",
dbesc($nick)
);
- if(! count($r)){
+ if(! dbm::is_result($r)){
if ($r_json) {
echo json_encode(array('error'=>t('Invalid request.')));
killme();
intval($contact_id),
intval($page_owner_uid)
);
- if(count($r)) {
+ if(dbm::is_result($r)) {
$can_post = true;
$visitor = $contact_id;
}
dbesc($hash)
);
- if(! count($r)) {
+ if(! dbm::is_result($r)) {
$msg = t('File upload failed.');
if ($r_json) {
echo json_encode(array('error'=>$msg));