aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_poll.php
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-04-10 23:34:55 -0400
committerSimon L'nu <simon.lnu@gmail.com>2012-04-10 23:34:55 -0400
commit75c7877986c118703839309268af14658c85f9b3 (patch)
tree573cfb0509f3a4bf060db9f011b57024a530b001 /mod/dfrn_poll.php
parent2af41ee57bbe766229368376670c4ee3b528b2c4 (diff)
parent0fa932853c76d8aca9fecf125d4c2d6816fb1a4a (diff)
downloadvolse-hubzilla-75c7877986c118703839309268af14658c85f9b3.tar.gz
volse-hubzilla-75c7877986c118703839309268af14658c85f9b3.tar.bz2
volse-hubzilla-75c7877986c118703839309268af14658c85f9b3.zip
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: profile redir - goto correct profile page even if contact blocked, you just can't do anything. * master:
Diffstat (limited to 'mod/dfrn_poll.php')
-rw-r--r--mod/dfrn_poll.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php
index 5c2788983..436727a78 100644
--- a/mod/dfrn_poll.php
+++ b/mod/dfrn_poll.php
@@ -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':