Update Kohana to 3.1.3.1
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
//-- Environment setup --------------------------------------------------------
|
||||
// -- Environment setup --------------------------------------------------------
|
||||
|
||||
// Load the core Kohana class
|
||||
require SYSPATH.'classes/kohana/core'.EXT;
|
||||
|
||||
if (is_file(APPPATH.'classes/kohana'.EXT))
|
||||
{
|
||||
// Application extends the core
|
||||
require APPPATH.'classes/kohana'.EXT;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Load empty core extension
|
||||
require SYSPATH.'classes/kohana'.EXT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default time zone.
|
||||
@@ -34,7 +48,23 @@ spl_autoload_register(array('Kohana', 'auto_load'));
|
||||
*/
|
||||
ini_set('unserialize_callback_func', 'spl_autoload_call');
|
||||
|
||||
//-- Configuration and initialization -----------------------------------------
|
||||
// -- Configuration and initialization -----------------------------------------
|
||||
|
||||
/**
|
||||
* Set the default language
|
||||
*/
|
||||
I18n::lang('en-us');
|
||||
|
||||
/**
|
||||
* Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
|
||||
*
|
||||
* Note: If you supply an invalid environment name, a PHP warning will be thrown
|
||||
* saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
|
||||
*/
|
||||
if (isset($_SERVER['KOHANA_ENV']))
|
||||
{
|
||||
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize Kohana, setting the default options.
|
||||
@@ -57,27 +87,33 @@ Kohana::init(array(
|
||||
/**
|
||||
* Attach the file write to logging. Multiple writers are supported.
|
||||
*/
|
||||
Kohana::$log->attach(new Kohana_Log_File(APPPATH.'logs'));
|
||||
Kohana::$log->attach(new Log_File(APPPATH.'logs'));
|
||||
|
||||
/**
|
||||
* Attach a file reader to config. Multiple readers are supported.
|
||||
*/
|
||||
Kohana::$config->attach(new Kohana_Config_File);
|
||||
Kohana::$config->attach(new Config_File);
|
||||
|
||||
/**
|
||||
* Enable modules. Modules are referenced by a relative or absolute path.
|
||||
*/
|
||||
Kohana::modules(array(
|
||||
'auth' => MODPATH.'auth', // Basic authentication
|
||||
// 'cache' => MODPATH.'cache', // Caching with multiple backends
|
||||
// 'codebench' => MODPATH.'codebench', // Benchmarking tool
|
||||
'database' => MODPATH.'database', // Database access
|
||||
// 'image' => MODPATH.'image', // Image manipulation
|
||||
'orm' => MODPATH.'orm', // Object Relationship Mapping
|
||||
// 'oauth' => MODPATH.'oauth', // OAuth authentication
|
||||
// 'pagination' => MODPATH.'pagination', // Paging of results
|
||||
// 'unittest' => MODPATH.'unittest', // Unit testing
|
||||
'userguide' => MODPATH.'userguide', // User guide and API documentation
|
||||
'auth' => SMDPATH.'auth', // Basic authentication
|
||||
'cache' => SMDPATH.'cache', // Caching with multiple backends
|
||||
// 'codebench' => SMDPATH.'codebench', // Benchmarking tool
|
||||
'database' => SMDPATH.'database', // Database access
|
||||
// 'image' => SMDPATH.'image', // Image manipulation
|
||||
'orm' => SMDPATH.'orm', // Object Relationship Mapping
|
||||
// 'unittest' => SMDPATH.'unittest', // Unit testing
|
||||
// 'userguide' => SMDPATH.'userguide', // User guide and API documentation
|
||||
));
|
||||
|
||||
/**
|
||||
* Enable specalised interfaces
|
||||
*/
|
||||
Route::set('sections', '<directory>/<controller>(/<action>(/<id>(/<sid>)))',
|
||||
array(
|
||||
'directory' => '('.implode('|',Kohana::config('config.method_directory')).')'
|
||||
));
|
||||
|
||||
/**
|
||||
@@ -97,15 +133,4 @@ Route::set('default/media', 'media(/<file>)', array('file' => '.+'))
|
||||
'action' => 'media',
|
||||
'file' => NULL,
|
||||
));
|
||||
|
||||
if ( ! defined('SUPPRESS_REQUEST'))
|
||||
{
|
||||
/**
|
||||
* Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
|
||||
* If no source is specified, the URI will be automatically detected.
|
||||
*/
|
||||
echo Request::instance()
|
||||
->execute()
|
||||
->send_headers()
|
||||
->response;
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user