]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_poll.php
Merge remote-tracking branch 'upstream/develop' into 1603-ostatus-completion
[friendica.git] / mod / dfrn_poll.php
index b5f60a0397e39020cd77253b925e2386136e0277..ab6637607e564b2d71eb2ba1353b6944a6216c65 100644 (file)
@@ -1,9 +1,7 @@
 <?php
-
-
-
 require_once('include/items.php');
 require_once('include/auth.php');
+require_once('include/dfrn.php');
 
 
 function dfrn_poll_init(&$a) {
@@ -46,7 +44,7 @@ function dfrn_poll_init(&$a) {
 
                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);
                killme();
        }
 
@@ -373,7 +371,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 +474,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 +491,7 @@ function dfrn_poll_content(&$a) {
                                        'sec' => $sec
                                ));
                        }
-                       
+
                        $profile = ((count($r) && $r[0]['nickname']) ? $r[0]['nickname'] : $nickname);
 
                        switch($destination_url) {
@@ -506,7 +504,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 +562,3 @@ function dfrn_poll_content(&$a) {
                }
        }
 }
-
-