Updated to KH 3.3.5

This commit is contained in:
Deon George
2016-05-01 21:36:37 +10:00
parent 08bd2a2810
commit 453f97324f
4 changed files with 132 additions and 26 deletions

View File

@@ -56,6 +56,13 @@ spl_autoload_register(array('Kohana', 'auto_load'));
*/
ini_set('unserialize_callback_func', 'spl_autoload_call');
/**
* Set the mb_substitute_character to "none"
*
* @link http://www.php.net/manual/function.mb-substitute-character.php
*/
mb_substitute_character('none');
// -- Configuration and initialization -----------------------------------------
/**
@@ -63,6 +70,12 @@ ini_set('unserialize_callback_func', 'spl_autoload_call');
*/
I18n::lang('en-us');
if (isset($_SERVER['SERVER_PROTOCOL']))
{
// Replace the default protocol.
HTTP::$protocol = $_SERVER['SERVER_PROTOCOL'];
}
/**
* Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
*
@@ -73,7 +86,7 @@ I18n::lang('en-us');
/**
* Set the environment status by the domain.
*/
Kohana::$environment = (! isset($_SERVER['SERVER_NAME']) OR (in_array($_SERVER['SERVER_NAME'],$SERVER_NAMES))) ? Kohana::PRODUCTION : Kohana::DEVELOPMENT;
Kohana::$environment = Kohana::PRODUCTION;
if (isset($_SERVER['KOHANA_ENV']))
{
@@ -97,8 +110,10 @@ if (isset($_SERVER['KOHANA_ENV']))
*/
Kohana::init(array(
'base_url' => '/',
'caching' => TRUE,
'index_file' => '',
'caching' => Kohana::$environment === Kohana::PRODUCTION,
'profile' => Kohana::$environment !== Kohana::PRODUCTION,
'index_file' => FALSE,
'cache_life' => 600,
));
/**
@@ -130,10 +145,19 @@ Kohana::modules(array(
'orm' => SMDPATH.'orm', // Object Relationship Mapping
'pagination' => SMDPATH.'pagination', // Kohana Pagination module for Kohana 3 PHP Framework
// 'unittest' => SMDPATH.'unittest', // Unit testing
// 'userguide' => SMDPATH.'userguide', // User guide and API documentation
'userguide' => SMDPATH.'userguide', // User guide and API documentation
'xml' => SMDPATH.'xml', // XML module for Kohana 3 PHP Framework
));
/**
* Cookie Salt
* @see http://kohanaframework.org/3.3/guide/kohana/cookies
*
* If you have not defined a cookie salt in your Cookie class then
* uncomment the line below and define a preferrably long salt.
*/
// Cookie::$salt = NULL;
/**
* Load our modules defined in the DB
*/