From f63636ed14ccd0e88f6e01153029ff6b79c91027 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Apr 2012 17:19:46 -0700 Subject: well that was a stupid mistake... --- mod/dfrn_poll.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/dfrn_poll.php') diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 6030587ce..5c2788983 100755 --- 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'])) -- cgit v1.2.3 From 0fa932853c76d8aca9fecf125d4c2d6816fb1a4a Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 10 Apr 2012 20:09:51 -0700 Subject: profile redir - goto correct profile page even if contact blocked, you just can't do anything. --- mod/dfrn_poll.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mod/dfrn_poll.php') 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': -- cgit v1.2.3