X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdfrn_poll.php;h=9613229dab04e3381f63a657448acb447f55e6ca;hb=eb1ba8934cb5283c50f5383d17638c11d27595fe;hp=b9fcd8c4a4c7be4978944d1882cf57a0dfa3124c;hpb=7d1a6cc1d60798ff91719686c1b4686f1c4d33e6;p=friendica.git diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index b9fcd8c4a4..9613229dab 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -1,9 +1,7 @@ argv[1]) ); - if(! $r) + if (!$r) http_status_exit(404); - if(($r[0]['hidewall']) && (! local_user())) - http_status_exit(403); + + $hidewall = ($r[0]['hidewall'] && !local_user()); + $user = $r[0]['nickname']; } logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . $user); header("Content-type: application/atom+xml"); - echo get_feed_for($a, '', $user,$last_update); + echo dfrn::feed('', $user,$last_update, 0, $hidewall); killme(); } @@ -373,7 +374,7 @@ function dfrn_poll_post(&$a) { } header("Content-type: application/atom+xml"); - $o = get_feed_for($a,$dfrn_id, $a->argv[1], $last_update, $direction); + $o = dfrn::feed($dfrn_id, $a->argv[1], $last_update, $direction); echo $o; killme(); @@ -389,7 +390,7 @@ function dfrn_poll_content(&$a) { $sec = ((x($_GET,'sec')) ? $_GET['sec'] : ''); $dfrn_version = ((x($_GET,'dfrn_version')) ? (float) $_GET['dfrn_version'] : 2.0); $perm = ((x($_GET,'perm')) ? $_GET['perm'] : 'r'); - $quiet = ((x($_GET,'quiet')) ? true : false); + $quiet = ((x($_GET,'quiet')) ? true : false); $direction = (-1); if(strpos($dfrn_id,':') == 1) { @@ -476,8 +477,8 @@ function dfrn_poll_content(&$a) { // URL reply if($dfrn_version < 2.2) { - $s = fetch_url($r[0]['poll'] - . '?dfrn_id=' . $encrypted_id + $s = fetch_url($r[0]['poll'] + . '?dfrn_id=' . $encrypted_id . '&type=profile-check' . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&challenge=' . $challenge @@ -493,7 +494,7 @@ function dfrn_poll_content(&$a) { 'sec' => $sec )); } - + $profile = ((count($r) && $r[0]['nickname']) ? $r[0]['nickname'] : $nickname); switch($destination_url) { @@ -506,7 +507,7 @@ function dfrn_poll_content(&$a) { case 'status': case '': $dest = $a->get_baseurl() . '/profile/' . $profile; - break; + break; default: $dest = $destination_url . '?f=&redir=1'; break; @@ -564,5 +565,3 @@ function dfrn_poll_content(&$a) { } } } - -