From 68896196ea6c6a9b98b7c0d2033d9dccb8467c55 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Sat, 29 Jul 2023 23:53:04 +0800 Subject: [PATCH] loggedinorreturn use nexus_redirect() --- include/constants.php | 2 +- include/functions.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/constants.php b/include/constants.php index 5aa5bc87a..6f04ffb18 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,5 +1,5 @@ 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(); }