mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-16 14:00:56 +08:00
loggedinorreturn use nexus_redirect()
This commit is contained in:
@@ -3100,12 +3100,12 @@ function loggedinorreturn($mainpage = false) {
|
||||
if (nexus()->getScript() == 'ajax') {
|
||||
exit(fail('Not login!', $_POST));
|
||||
}
|
||||
if ($mainpage)
|
||||
header("Location: " . get_protocol_prefix() . "$BASEURL/login.php");
|
||||
else {
|
||||
if ($mainpage) {
|
||||
nexus_redirect("login.php");
|
||||
} else {
|
||||
$to = $_SERVER["REQUEST_URI"];
|
||||
$to = basename($to);
|
||||
header("Location: " . get_protocol_prefix() . "$BASEURL/login.php?returnto=" . rawurlencode($to));
|
||||
nexus_redirect("login.php?returnto=" . rawurlencode($to));
|
||||
}
|
||||
exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user