aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_poll.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-26 17:57:27 -0700
committerfriendica <info@friendica.com>2012-03-26 17:57:27 -0700
commitb5d0315d55b6488d9493dd49bd35a2fe1b1492c7 (patch)
treefc3fbda1fd755912423fb186a651d64c5eb8dab0 /mod/dfrn_poll.php
parent03b95c9a091920d0796f7835afc762d09971ab32 (diff)
downloadvolse-hubzilla-b5d0315d55b6488d9493dd49bd35a2fe1b1492c7.tar.gz
volse-hubzilla-b5d0315d55b6488d9493dd49bd35a2fe1b1492c7.tar.bz2
volse-hubzilla-b5d0315d55b6488d9493dd49bd35a2fe1b1492c7.zip
preparation for some possibly killer features
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();
}