Remove auto-detection of modules to enhance performance.

This commit is contained in:
Taylor Otwell 2011-08-05 11:40:29 -05:00
parent 26bc2379c4
commit cc9c45710b
1 changed files with 1 additions and 6 deletions

View File

@ -40,11 +40,6 @@
require SYS_PATH.'config'.EXT; require SYS_PATH.'config'.EXT;
require SYS_PATH.'arr'.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. // Register the auto-loader.
// -------------------------------------------------------------- // --------------------------------------------------------------
@ -131,7 +126,7 @@
// -------------------------------------------------------------- // --------------------------------------------------------------
if (is_null($response)) 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); define('ACTIVE_MODULE', $module);