aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_poll.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2012-04-24 02:18:51 +0100
committerThomas Willingham <founder@kakste.com>2012-04-24 02:18:51 +0100
commit8a80ea24d1d8039be6dc532c9db23c60e71eb467 (patch)
tree7f94f8d1e2336bbb7e69a327a003b6880f0610c0 /mod/dfrn_poll.php
parentc4f4715a541ad89dfd348f14c4e25a83006e74e7 (diff)
parentaf7abcea2715824cbd6460a7323c8bb64bd5b829 (diff)
downloadvolse-hubzilla-8a80ea24d1d8039be6dc532c9db23c60e71eb467.tar.gz
volse-hubzilla-8a80ea24d1d8039be6dc532c9db23c60e71eb467.tar.bz2
volse-hubzilla-8a80ea24d1d8039be6dc532c9db23c60e71eb467.zip
Merge remote-tracking branch 'upstream/master'
Merge upstream
Diffstat (limited to 'mod/dfrn_poll.php')
-rw-r--r--[-rwxr-xr-x]mod/dfrn_poll.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php
index 6030587ce..436727a78 100755..100644
--- a/mod/dfrn_poll.php
+++ b/mod/dfrn_poll.php
@@ -33,7 +33,7 @@ function dfrn_poll_init(&$a) {
$user = '';
if($a->argc > 1) {
- $r = q("SELECT `hidewall` FROM `user` WHERE `user`.`nickname` = '%s' LIMIT 1",
+ $r = q("SELECT `hidewall`,`nickname` FROM `user` WHERE `user`.`nickname` = '%s' LIMIT 1",
dbesc($a->argv[1])
);
if((! count($r)) || (count($r) && $r[0]['hidewall']))
@@ -428,11 +428,13 @@ function dfrn_poll_content(&$a) {
break; // NOTREACHED
}
+ $nickname = $a->argv[1];
+
$r = q("SELECT `contact`.*, `user`.`username`, `user`.`nickname`
FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
WHERE `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `user`.`nickname` = '%s' $sql_extra LIMIT 1",
- dbesc($a->argv[1])
+ dbesc($nickname)
);
if(count($r)) {
@@ -482,7 +484,7 @@ function dfrn_poll_content(&$a) {
));
}
- $profile = $r[0]['nickname'];
+ $profile = ((count($r) && $r[0]['nickname']) ? $r[0]['nickname'] : $nickname);
switch($destination_url) {
case 'profile':