dbesc($a->argv[1])
);
- if(count($r)) {
+ if(dbm::is_result($r)) {
$s = fetch_url($r[0]['poll'] . '?dfrn_id=' . $my_id . '&type=profile-check');
$r = q("SELECT * FROM `profile_check` WHERE `sec` = '%s' ORDER BY `expire` DESC LIMIT 1",
dbesc($sec)
);
- if(! count($r)) {
+ if(! dbm::is_result($r)) {
xml_status(3, 'No ticket');
// NOTREACHED
}
q("DELETE FROM `profile_check` WHERE `expire` < " . intval(time()));
$r = q("SELECT * FROM `profile_check` WHERE `dfrn_id` = '%s' ORDER BY `expire` DESC",
dbesc($dfrn_id));
- if(count($r)) {
+ if(dbm::is_result($r)) {
xml_status(1);
return; // NOTREACHED
}
$r = q("SELECT * FROM `profile_check` WHERE `sec` = '%s' ORDER BY `expire` DESC LIMIT 1",
dbesc($sec)
);
- if(! count($r)) {
+ if(! dbm::is_result($r)) {
xml_status(3, 'No ticket');
// NOTREACHED
}
dbesc($challenge)
);
- if(! count($r))
+ if(! dbm::is_result($r))
killme();
$type = $r[0]['type'];
$r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 $sql_extra LIMIT 1");
- if(! count($r))
+ if(! dbm::is_result($r))
killme();
$contact = $r[0];
$reputation = 0;
$text = '';
- if(count($r)) {
+ if(dbm::is_result($r)) {
$reputation = $r[0]['rating'];
$text = $r[0]['reason'];
dbesc($nickname)
);
- if(count($r)) {
+ if(dbm::is_result($r)) {
$challenge = '';
$encrypted_id = '';
));
}
- $profile = ((count($r) && $r[0]['nickname']) ? $r[0]['nickname'] : $nickname);
+ $profile = ((dbm::is_result($r) && $r[0]['nickname']) ? $r[0]['nickname'] : $nickname);
switch($destination_url) {
case 'profile':