mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
loggedinorreturn use nexus_redirect()
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.5');
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.6');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-07-29');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
|
||||
@@ -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