]> git.mxchange.org Git - friendica.git/commitdiff
Small correction
authorMichael <heluecht@pirati.ca>
Thu, 31 Aug 2017 12:10:17 +0000 (12:10 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 31 Aug 2017 12:10:17 +0000 (12:10 +0000)
mod/redir.php

index 6d3ffb2224c047cb001fd2b0bfd49478fe093b76..998e9cc0bd9bdac5a34195090074a3a429a267db 100644 (file)
@@ -21,9 +21,12 @@ function redir_init(App $a) {
                                intval(local_user())
                        );
 
-                       if (!dbm::is_result($r) || ($r[0]['network'] !== NETWORK_DFRN))
+                       if (!dbm::is_result($r)) {
                                goaway(System::baseUrl());
-
+                       }
+                       if ($r[0]['network'] !== NETWORK_DFRN) {
+                               goaway(($url != '' ? $url : $r[0]['url']));
+                       }
                        $cid = $r[0]['id'];
                } else {
                        $cid = $a->argv[1];
@@ -37,7 +40,7 @@ function redir_init(App $a) {
                                goaway(System::baseUrl());
                        }
                        if ($r[0]['network'] !== NETWORK_DFRN) {
-                               goaway($r[0]['url']);
+                               goaway(($url != '' ? $url : $r[0]['url']));
                        }
                }