From cc9c45710ba11070f79c489462b1cef0c2274b6e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 5 Aug 2011 11:40:29 -0500 Subject: [PATCH] Remove auto-detection of modules to enhance performance. --- system/laravel.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/system/laravel.php b/system/laravel.php index 42e2307c..235dc600 100644 --- a/system/laravel.php +++ b/system/laravel.php @@ -40,11 +40,6 @@ require SYS_PATH.'loader'.EXT; require SYS_PATH.'config'.EXT; require SYS_PATH.'arr'.EXT; -// -------------------------------------------------------------- -// Detect all of the application modules. -// -------------------------------------------------------------- -Config::set('application.modules', $modules = array_map('basename', glob(MODULE_PATH.'*', GLOB_ONLYDIR))); - // -------------------------------------------------------------- // Register the auto-loader. // -------------------------------------------------------------- @@ -131,7 +126,7 @@ $response = Routing\Filter::call('before', array(), true); // -------------------------------------------------------------- if (is_null($response)) { - if (in_array($module = Request::segment(1), $modules)) + if (in_array($module = Request::segment(1), Config::get('application.modules'))) { define('ACTIVE_MODULE', $module);