Initialize Kohana::$config and Kohana::$log before loading modules, fixes #62

This commit is contained in:
Woody Gilk 2009-07-25 18:13:28 -05:00
parent c22d49bb3f
commit 5c238fb352

View file

@ -44,6 +44,16 @@ spl_autoload_register(array('Kohana', 'auto_load'));
*/
Kohana::init(array('base_url' => '/ko3/'));
/**
* Attach the file write to logging. Multiple writers are supported.
*/
Kohana::$log->attach(new Kohana_Log_File(APPPATH.'logs'));
/**
* Attach a file reader to config. Multiple readers are supported.
*/
Kohana::$config->attach(new Kohana_Config_File);
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
@ -59,16 +69,6 @@ Kohana::modules(array(
// 'codebench' => MODPATH.'codebench', // Benchmarking tool
));
/**
* Attach the file write to logging. Multiple writers are supported.
*/
Kohana::$log->attach(new Kohana_Log_File(APPPATH.'logs'));
/**
* Attach a file reader to config. Multiple readers are supported.
*/
Kohana::$config->attach(new Kohana_Config_File);
/**
* Set the routes. Each route must have a minimum of a name, a URI and a set of
* defaults for the URI.