exit on redirect
This commit is contained in:
parent
6861f5cf03
commit
a121abd910
@ -51,6 +51,7 @@ function initRouter(): bool
|
|||||||
$routerRequest["page_name"];
|
$routerRequest["page_name"];
|
||||||
// Redirect with default page name
|
// Redirect with default page name
|
||||||
header("Location: $redirectAddress");
|
header("Location: $redirectAddress");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if($_SERVER["REQUEST_METHOD"] == "POST"){
|
if($_SERVER["REQUEST_METHOD"] == "POST"){
|
||||||
@ -59,14 +60,8 @@ function initRouter(): bool
|
|||||||
if(empty($routerRequest["type"])){
|
if(empty($routerRequest["type"])){
|
||||||
$routerRequest["type"] = "page";
|
$routerRequest["type"] = "page";
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
if ($needsRedirect){
|
|
||||||
echo "yes";
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
echo "no";
|
|
||||||
}
|
|
||||||
return !$needsRedirect;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user