aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_poll.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/dfrn_poll.php')
-rwxr-xr-xmod/dfrn_poll.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php
index fe5cd4906..6030587ce 100755
--- a/mod/dfrn_poll.php
+++ b/mod/dfrn_poll.php
@@ -26,21 +26,24 @@ function dfrn_poll_init(&$a) {
$dfrn_id = substr($dfrn_id,2);
}
- if(($dfrn_id === '') && (! x($_POST,'dfrn_id')) && ($a->argc > 1)) {
+ if(($dfrn_id === '') && (! x($_POST,'dfrn_id'))) {
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
killme();
}
- $r = q("SELECT `hidewall` FROM `user` WHERE `user`.`nickname` = '%s' LIMIT 1",
- dbesc($a->argv[1])
- );
- if(count($r) && $r[0]['hidewall'])
- killme();
+ $user = '';
+ if($a->argc > 1) {
+ $r = q("SELECT `hidewall` FROM `user` WHERE `user`.`nickname` = '%s' LIMIT 1",
+ dbesc($a->argv[1])
+ );
+ if((! count($r)) || (count($r) && $r[0]['hidewall']))
+ killme();
+ $user = $r[0]['nickname'];
+ }
- logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] );
+ logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . $user);
header("Content-type: application/atom+xml");
- $o = get_feed_for($a, '', $a->argv[1],$last_update);
- echo $o;
+ echo get_feed_for($a, '', $user,$last_update);
killme();
}