X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdfrn_confirm.php;h=2f2c5baad31197b156feb169f51c334214da5d8f;hb=6a8a36f12d00f35004fbb034972ca87dd1a3c4f5;hp=5aea4eede967524f4b093dd04657aebadb985479;hpb=293436e5fd5110220c969513858dbb979f1f35d3;p=friendica.git diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 5aea4eede9..2f2c5baad3 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -121,7 +121,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { 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 ); @@ -423,7 +423,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $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; @@ -443,7 +443,7 @@ function dfrn_confirm_post(&$a,$handsfree = 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'); @@ -553,7 +553,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $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 @@ -629,7 +629,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $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 @@ -640,7 +640,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { 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); } @@ -661,7 +661,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $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'; @@ -714,10 +714,10 @@ function dfrn_confirm_post(&$a,$handsfree = null) { 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, @@ -742,7 +742,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { 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');