Commit cc9c4571 authored by Taylor Otwell's avatar Taylor Otwell

Remove auto-detection of modules to enhance performance.

parent 26bc2379
...@@ -40,11 +40,6 @@ require SYS_PATH.'loader'.EXT; ...@@ -40,11 +40,6 @@ require SYS_PATH.'loader'.EXT;
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 @@ $response = Routing\Filter::call('before', array(), true); ...@@ -131,7 +126,7 @@ $response = Routing\Filter::call('before', array(), true);
// -------------------------------------------------------------- // --------------------------------------------------------------
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment