exit on redirect

This commit is contained in:
Bruno Rybársky 2024-02-02 16:22:36 +01:00
parent 6861f5cf03
commit a121abd910

@ -51,6 +51,7 @@ function initRouter(): bool
$routerRequest["page_name"];
// Redirect with default page name
header("Location: $redirectAddress");
return false;
}
else{
if($_SERVER["REQUEST_METHOD"] == "POST"){
@ -59,14 +60,8 @@ function initRouter(): bool
if(empty($routerRequest["type"])){
$routerRequest["type"] = "page";
}
return true;
}
if ($needsRedirect){
echo "yes";
}
else{
echo "no";
}
return !$needsRedirect;
}