X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fdfrn_poll.php;h=9613229dab04e3381f63a657448acb447f55e6ca;hb=3d6e3cbb78aa7791068ebad173a53c9cf600625a;hp=b5f60a0397e39020cd77253b925e2386136e0277;hpb=709022ddee9bc2e9995911e02e40d1b1dd5150b0;p=friendica.git diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index b5f60a0397..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(); @@ -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) { } } } - -