1
0
Fork 0

Continued rewriting:

- use dba::is_result() everywhere (where I found the old, bad way)
- converted some spaces -> tabs for code
- converted some CRLF -> LF as mixures of both is not good

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2016-05-01 14:24:44 +02:00
commit 3e701b90ac
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
93 changed files with 451 additions and 450 deletions

View file

@ -418,7 +418,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(dba::is_result($r))
$contact = $r[0];
else
$contact = null;
@ -438,7 +438,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
intval($uid)
);
if((count($r)) && ($r[0]['hide-friends'] == 0) && ($activity) && (! $hidden)) {
if((dba::is_result($r)) && ($r[0]['hide-friends'] == 0) && ($activity) && (! $hidden)) {
require_once('include/items.php');
@ -624,7 +624,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(dba::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
@ -656,7 +656,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(dba::is_result($r))
$photo = $r[0]['photo'];
else
$photo = $a->get_baseurl() . '/images/person-175.jpg';
@ -709,10 +709,10 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
intval($dfrn_record)
);
if(count($r))
if(dba::is_result($r))
$combined = $r[0];
if((count($r)) && ($r[0]['notify-flags'] & NOTIFY_CONFIRM)) {
if((dba::is_result($r)) && ($r[0]['notify-flags'] & NOTIFY_CONFIRM)) {
$mutual = ($new_relation == CONTACT_IS_FRIEND);
notification(array(
'type' => NOTIFY_CONFIRM,
@ -737,7 +737,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
intval($local_uid)
);
if((count($r)) && ($r[0]['hide-friends'] == 0)) {
if((dba::is_result($r)) && ($r[0]['hide-friends'] == 0)) {
require_once('include/items.php');