From 7b93f41496eccf16a118744971c46dd671b2df98 Mon Sep 17 00:00:00 2001 From: Lillem4n Date: Fri, 22 Oct 2010 06:42:24 -0700 Subject: [PATCH 1/2] Altered RewriteBase to match base_url in application/bootstrap.php --- example.htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example.htaccess b/example.htaccess index 87b9cf8..53b8ccb 100644 --- a/example.htaccess +++ b/example.htaccess @@ -2,7 +2,7 @@ RewriteEngine On # Installation directory -RewriteBase /kohana/ +RewriteBase / # Protect hidden files from being viewed From c36a59a97f147465be51ec38e51717720f4e1127 Mon Sep 17 00:00:00 2001 From: Jeremy Bush Date: Tue, 26 Oct 2010 18:58:38 -0500 Subject: [PATCH 2/2] Move old base.php functionality to index.php and bootstrap.php. Fixes #3249. --- application/bootstrap.php | 5 +++++ index.php | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/application/bootstrap.php b/application/bootstrap.php index abbf3ec..e5ad710 100644 --- a/application/bootstrap.php +++ b/application/bootstrap.php @@ -36,6 +36,11 @@ ini_set('unserialize_callback_func', 'spl_autoload_call'); //-- Configuration and initialization ----------------------------------------- +/** + * Set the default language + */ +I18n::lang('en-us'); + /** * Set Kohana::$environment if $_ENV['KOHANA_ENV'] has been supplied. * diff --git a/index.php b/index.php index c6b0963..f30ecb7 100644 --- a/index.php +++ b/index.php @@ -82,8 +82,21 @@ if (file_exists('install'.EXT)) return include 'install'.EXT; } -// Load the base, low-level functions -require SYSPATH.'base'.EXT; +if ( ! defined('KOHANA_START_TIME')) +{ + /** + * Define the start time of the application, used for profiling. + */ + define('KOHANA_START_TIME', microtime(TRUE)); +} + +if ( ! defined('KOHANA_START_MEMORY')) +{ + /** + * Define the memory usage at the start of the application, used for profiling. + */ + define('KOHANA_START_MEMORY', memory_get_usage()); +} // Load the core Kohana class require SYSPATH.'classes/kohana/core'.EXT;