Skip to content

Commit

Permalink
loggedinorreturn use nexus_redirect()
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Jul 29, 2023
1 parent 83d3066 commit 6889619
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/constants.php
Original file line number Diff line number Diff line change
@@ -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");
Expand Down
8 changes: 4 additions & 4 deletions include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 6889619

Please sign in to comment.