Upgrade to KH 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,12 +87,12 @@ 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.
|
||||
@@ -74,13 +104,11 @@ Kohana::modules(array(
|
||||
'database' => SMDPATH.'database', // Database access
|
||||
// 'image' => SMDPATH.'image', // Image manipulation
|
||||
'orm' => SMDPATH.'orm', // Object Relationship Mapping
|
||||
// 'oauth' => SMDPATH.'oauth', // OAuth authentication
|
||||
// 'pagination' => SMDPATH.'pagination', // Paging of results
|
||||
// 'unittest' => SMDPATH.'unittest', // Unit testing
|
||||
// 'userguide' => SMDPATH.'userguide', // User guide and API documentation
|
||||
'xml' => SMDPATH.'xml', // XML module for Kohana 3 PHP Framework
|
||||
'email' => SMDPATH.'email', // Email module for Kohana 3 PHP Framework
|
||||
'gchart' => MODPATH.'gchart', // Google Chart Module
|
||||
'userguide' => SMDPATH.'userguide', // User guide and API documentation
|
||||
'email' => SMDPATH.'email', // Email module for Kohana 3 PHP Framework
|
||||
'gchart' => MODPATH.'gchart', // Google Chart Module
|
||||
'xml' => SMDPATH.'xml', // XML module for Kohana 3 PHP Framework
|
||||
));
|
||||
|
||||
/**
|
||||
@@ -113,21 +141,3 @@ Route::set('default/media', 'media(/<file>)', array('file' => '.+'))
|
||||
'action' => 'media',
|
||||
'file' => NULL,
|
||||
));
|
||||
|
||||
// Make sure their PHP version is current enough
|
||||
if (strcmp(phpversion(),'5.3') < 0) {
|
||||
echo 'This application requires PHP 5.3 or newer to run';
|
||||
die();
|
||||
}
|
||||
|
||||
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