X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdfrn_poll.php;h=506f9f162f2159dc1cd8fc75229cff93d11f202c;hb=f146c85e75314462823076a9d89ac2e698e6de45;hp=0c55af2a8959f26f86ca7e6cdba4d9b054794115;hpb=ad20c5504deba9dbb4ea5c5deba598f2c448b344;p=friendica.git diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 0c55af2a89..506f9f162f 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -4,7 +4,7 @@ require_once('include/auth.php'); require_once('include/dfrn.php'); -function dfrn_poll_init(&$a) { +function dfrn_poll_init(App $a) { $dfrn_id = ((x($_GET,'dfrn_id')) ? $_GET['dfrn_id'] : ''); @@ -137,7 +137,7 @@ function dfrn_poll_init(&$a) { $c = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1", intval($r[0]['cid']) ); - if(! count($c)) { + if (! dbm::is_result($c)) { xml_status(3, 'No profile'); } $contact = $c[0]; @@ -163,7 +163,7 @@ function dfrn_poll_init(&$a) { if($final_dfrn_id != $orig_id) { logger('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, LOGGER_DEBUG); - // did not decode properly - cannot trust this site + // did not decode properly - cannot trust this site xml_status(3, 'Bad decryption'); } @@ -203,7 +203,7 @@ function dfrn_poll_init(&$a) { -function dfrn_poll_post(&$a) { +function dfrn_poll_post(App $a) { $dfrn_id = ((x($_POST,'dfrn_id')) ? $_POST['dfrn_id'] : ''); $challenge = ((x($_POST,'challenge')) ? $_POST['challenge'] : ''); @@ -234,7 +234,7 @@ function dfrn_poll_post(&$a) { $c = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1", intval($r[0]['cid']) ); - if(! count($c)) { + if (! dbm::is_result($c)) { xml_status(3, 'No profile'); } $contact = $c[0]; @@ -260,7 +260,7 @@ function dfrn_poll_post(&$a) { if($final_dfrn_id != $orig_id) { logger('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, LOGGER_DEBUG); - // did not decode properly - cannot trust this site + // did not decode properly - cannot trust this site xml_status(3, 'Bad decryption'); } @@ -383,7 +383,7 @@ function dfrn_poll_post(&$a) { } } -function dfrn_poll_content(&$a) { +function dfrn_poll_content(App $a) { $dfrn_id = ((x($_GET,'dfrn_id')) ? $_GET['dfrn_id'] : ''); $type = ((x($_GET,'type')) ? $_GET['type'] : 'data');