diff --git a/lib/router.php b/lib/router.php index bb19dec..d2f90e3 100644 --- a/lib/router.php +++ b/lib/router.php @@ -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; }