intval($uid)
);
- if(! count($r)) {
+ if(! dbm::is_result($r)) {
logger('Contact not found in DB.');
notice( t('Contact not found.') . EOL );
notice( t('This may occasionally happen if contact was requested by both persons and it has already been approved.') . EOL );
$r = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
intval($contact_id)
);
- if(count($r))
+ if (dbm::is_result($r))
$contact = $r[0];
else
$contact = null;
intval($uid)
);
- if((count($r)) && ($r[0]['hide-friends'] == 0) && ($activity) && (! $hidden)) {
+ if((dbm::is_result($r)) && ($r[0]['hide-friends'] == 0) && ($activity) && (! $hidden)) {
require_once('include/items.php');
$r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1",
dbesc($node));
- if(! count($r)) {
+ if(! dbm::is_result($r)) {
$message = sprintf(t('No user record found for \'%s\' '), $node);
xml_status(3,$message); // failure
// NOTREACHED
dbesc($decrypted_source_url),
intval($local_uid)
);
- if(! count($ret)) {
+ if(! dbm::is_result($ret)) {
if(strstr($decrypted_source_url,'http:'))
$newurl = str_replace('http:','https:',$decrypted_source_url);
else
dbesc($newurl),
intval($local_uid)
);
- if(! count($ret)) {
+ if(! dbm::is_result($ret)) {
// this is either a bogus confirmation (?) or we deleted the original introduction.
$message = t('Contact record was not found for you on our site.');
xml_status(3,$message);
$r = q("SELECT * FROM `contact` WHERE `dfrn-id` = '%s' LIMIT 1",
dbesc($decrypted_dfrn_id)
);
- if(count($r)) {
+ if (dbm::is_result($r)) {
$message = t('The ID provided by your system is a duplicate on our system. It should work if you try again.');
xml_status(1,$message); // Birthday paradox - duplicate dfrn-id
// NOTREACHED
dbesc($dfrn_pubkey),
intval($dfrn_record)
);
- if(! count($r)) {
+ if(! dbm::is_result($r)) {
$message = t('Unable to set your contact credentials on our system.');
xml_status(3,$message);
}
$r = q("SELECT `photo` FROM `contact` WHERE `id` = %d LIMIT 1",
intval($dfrn_record));
- if(count($r))
+ if (dbm::is_result($r))
$photo = $r[0]['photo'];
else
$photo = $a->get_baseurl() . '/images/person-175.jpg';
intval($dfrn_record)
);
- if(count($r))
+ if (dbm::is_result($r))
$combined = $r[0];
- if((count($r)) && ($r[0]['notify-flags'] & NOTIFY_CONFIRM)) {
+ if((dbm::is_result($r)) && ($r[0]['notify-flags'] & NOTIFY_CONFIRM)) {
$mutual = ($new_relation == CONTACT_IS_FRIEND);
notification(array(
'type' => NOTIFY_CONFIRM,
intval($local_uid)
);
- if((count($r)) && ($r[0]['hide-friends'] == 0)) {
+ if((dbm::is_result($r)) && ($r[0]['hide-friends'] == 0)) {
require_once('include/items.php');