From e833dafd5f4635b74e2aef002251f491c5316267 Mon Sep 17 00:00:00 2001 From: Antonio de la Rosa Date: Sun, 1 May 2022 00:30:37 +0200 Subject: [PATCH] Fixes in index.php --- index.php | 2 +- libraries/Routes.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 868b65c..7f4bc0b 100644 --- a/index.php +++ b/index.php @@ -13,7 +13,7 @@ if(is_file('vendor/autoload.php')) { ob_start(); -Utils::load_config('settings/config'); +Utils::load_config('config'); $path_info=isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : ''; diff --git a/libraries/Routes.php b/libraries/Routes.php index beb9657..e7c1ba6 100644 --- a/libraries/Routes.php +++ b/libraries/Routes.php @@ -7,7 +7,7 @@ class Config { static public $home_module='welcome'; - static public $modules_allowed=['welcome' => false]; + static public $modules_allowed=['welcome' => true]; } @@ -51,8 +51,8 @@ function get_route($path_info) { case 1: $controller='modules/'.$arr_path[1].'/controllers/index.php'; - echo 'pepe'; - if(Config::$modules_allowed[$arr_path[1]]==true) { + + if(Config::$modules_allowed[$arr_path[1]]) { return \PhangoApp\PhaRouter\get_controller($controller, []); @@ -64,7 +64,7 @@ function get_route($path_info) { $controller='modules/'.$arr_path[1].'/controllers/'.$arr_path[2].'.php'; - if(Config::$modules_allowed[$arr_path[1]]==true) { + if(Config::$modules_allowed[$arr_path[1]]) { return \PhangoApp\PhaRouter\get_controller($controller, []); @@ -76,7 +76,7 @@ function get_route($path_info) { $controller='modules/'.$arr_path[1].'/controllers/'.$arr_path[2].'.php'; - if(Config::$modules_allowed[$arr_path[1]]==true) { + if(Config::$modules_allowed[$arr_path[1]]) { $args=array_slice($arr_path, 2, count($arr_path));