Update Kohana to 3.1.3.1
This commit is contained in:
58
kh.php
58
kh.php
@@ -13,7 +13,12 @@ $application = 'application';
|
||||
*
|
||||
* @see http://kohanaframework.org/guide/about.install#modules
|
||||
*/
|
||||
$modules = 'includes/kohana/modules';
|
||||
$modules = 'modules';
|
||||
|
||||
/**
|
||||
* The directory in which upstream Kohana resources (modules) are located.
|
||||
*/
|
||||
$sysmodules = 'includes/kohana/modules';
|
||||
|
||||
/**
|
||||
* The directory in which the Kohana resources are located. The system
|
||||
@@ -56,31 +61,30 @@ error_reporting(E_ALL | E_STRICT);
|
||||
// Set the full path to the docroot
|
||||
define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
|
||||
|
||||
// Make the application relative to the docroot
|
||||
// Make the application relative to the docroot, for symlink'd index.php
|
||||
if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
|
||||
{
|
||||
$application = DOCROOT.$application;
|
||||
}
|
||||
|
||||
// Make the modules relative to the docroot
|
||||
// Make the modules relative to the docroot, for symlink'd index.php
|
||||
if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
|
||||
{
|
||||
$modules = DOCROOT.$modules;
|
||||
}
|
||||
|
||||
// Make the system relative to the docroot
|
||||
// Make the system relative to the docroot, for symlink'd index.php
|
||||
if ( ! is_dir($sysmodules) AND is_dir(DOCROOT.$sysmodules))
|
||||
$sysmodules = DOCROOT.$sysmodules;
|
||||
|
||||
// Make the system relative to the docroot, for symlink'd index.php
|
||||
if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
|
||||
{
|
||||
$system = DOCROOT.$system;
|
||||
}
|
||||
|
||||
// Define the absolute paths for configured directories
|
||||
define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
|
||||
define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
|
||||
define('SMDPATH', realpath($sysmodules).DIRECTORY_SEPARATOR);
|
||||
define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
|
||||
|
||||
// Clean up the configuration vars
|
||||
unset($application, $modules, $system);
|
||||
unset($application, $modules, $sysmodules, $system);
|
||||
|
||||
if (file_exists('install'.EXT))
|
||||
{
|
||||
@@ -88,22 +92,30 @@ if (file_exists('install'.EXT))
|
||||
return include 'install'.EXT;
|
||||
}
|
||||
|
||||
// Load the base, low-level functions
|
||||
require SYSPATH.'base'.EXT;
|
||||
|
||||
// Load the core Kohana class
|
||||
require SYSPATH.'classes/kohana/core'.EXT;
|
||||
|
||||
if (is_file(APPPATH.'classes/kohana'.EXT))
|
||||
/**
|
||||
* Define the start time of the application, used for profiling.
|
||||
*/
|
||||
if ( ! defined('KOHANA_START_TIME'))
|
||||
{
|
||||
// Application extends the core
|
||||
require APPPATH.'classes/kohana'.EXT;
|
||||
define('KOHANA_START_TIME', microtime(TRUE));
|
||||
}
|
||||
else
|
||||
|
||||
/**
|
||||
* Define the memory usage at the start of the application, used for profiling.
|
||||
*/
|
||||
if ( ! defined('KOHANA_START_MEMORY'))
|
||||
{
|
||||
// Load empty core extension
|
||||
require SYSPATH.'classes/kohana'.EXT;
|
||||
define('KOHANA_START_MEMORY', memory_get_usage());
|
||||
}
|
||||
|
||||
// Bootstrap the application
|
||||
require APPPATH.'bootstrap'.EXT;
|
||||
|
||||
/**
|
||||
* 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::factory()
|
||||
->execute()
|
||||
->send_headers()
|
||||
->body();
|
||||
|
Reference in New Issue
Block a user