]> git.mxchange.org Git - friendica.git/commitdiff
profile redir - goto correct profile page even if contact blocked, you just can't...
authorfriendica <info@friendica.com>
Wed, 11 Apr 2012 03:09:51 +0000 (20:09 -0700)
committerfriendica <info@friendica.com>
Wed, 11 Apr 2012 03:09:51 +0000 (20:09 -0700)
mod/dfrn_poll.php

index 5c27889831575a1e8cbd2f88ffff1a70530666cc..436727a78fca603bcb1e00c04ddd5b97a92674bf 100644 (file)
@@ -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':