]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_poll.php
salmon protocol changes magicsig draft-experimental, fixes to hostxrd
[friendica.git] / mod / dfrn_poll.php
index 718aa165c6bbefd9a229e40f5e7a2d1c739a1dfd..09f198b81465dc33a4cf3a87161b4bfd9734c114 100644 (file)
@@ -31,6 +31,12 @@ function dfrn_poll_init(&$a) {
                        killme();
                }
 
+               $r = q("SELECT `hidewall` FROM `user` WHERE `user`.`nickname` = '%s' LIMIT 1",
+                       dbesc($a->argv[1])
+               );
+               if(count($r) && $r[0]['hidewall'])
+                       killme();
                logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] );
                header("Content-type: application/atom+xml");
                $o = get_feed_for($a, '', $a->argv[1],$last_update);
@@ -55,7 +61,7 @@ function dfrn_poll_init(&$a) {
                                $my_id = '0:' . $dfrn_id;
                                break;
                        default:
-                               goaway($a->get_baseurl());
+                               goaway(z_root());
                                break; // NOTREACHED
                }
 
@@ -81,7 +87,7 @@ function dfrn_poll_init(&$a) {
                                        $_SESSION['visitor_id'] = $r[0]['id'];
                                        $_SESSION['visitor_home'] = $r[0]['url'];
                                        $_SESSION['visitor_visiting'] = $r[0]['uid'];
-                                       notice( sprintf(t('%s welcomes %s'), $r[0]['username'] , $r[0]['name']) . EOL);
+                                       info( sprintf(t('%s welcomes %s'), $r[0]['username'] , $r[0]['name']) . EOL);
                                        // Visitors get 1 day session.
                                        $session_id = session_id();
                                        $expire = time() + 86400;
@@ -94,7 +100,7 @@ function dfrn_poll_init(&$a) {
                        $profile = $r[0]['nickname'];
                        goaway((strlen($destination_url)) ? $destination_url : $a->get_baseurl() . '/profile/' . $profile);
                }
-               goaway($a->get_baseurl());
+               goaway(z_root());
 
        }
 
@@ -291,7 +297,7 @@ function dfrn_poll_post(&$a) {
                        $my_id = '0:' . $dfrn_id;
                        break;
                default:
-                       goaway($a->get_baseurl());
+                       goaway(z_root());
                        break; // NOTREACHED
        }
 
@@ -414,7 +420,7 @@ function dfrn_poll_content(&$a) {
                                $my_id = '0:' . $dfrn_id;
                                break;
                        default:
-                               goaway($a->get_baseurl());
+                               goaway(z_root());
                                break; // NOTREACHED
                }
 
@@ -507,7 +513,7 @@ function dfrn_poll_content(&$a) {
                                        $_SESSION['visitor_id'] = $r[0]['id'];
                                        $_SESSION['visitor_home'] = $r[0]['url'];
                                        $_SESSION['visitor_visiting'] = $r[0]['uid'];
-                                       notice( sprintf(t('%s welcomes %s'), $r[0]['username'] , $r[0]['name']) . EOL);
+                                       info( sprintf(t('%s welcomes %s'), $r[0]['username'] , $r[0]['name']) . EOL);
                                        // Visitors get 1 day session.
                                        $session_id = session_id();
                                        $expire = time() + 86400;