X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fdfrn_poll.php;h=09f198b81465dc33a4cf3a87161b4bfd9734c114;hb=2abcf76ec17a9a7754c399cdde9a4449308a4b02;hp=718aa165c6bbefd9a229e40f5e7a2d1c739a1dfd;hpb=4cff911939b263993eb41682ca558c975e2db01f;p=friendica.git diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 718aa165c6..09f198b814 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -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;