Small correction

This commit is contained in:
Michael 2017-08-31 12:10:17 +00:00
parent 0e8104b172
commit 88fb02db8d

View file

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