From df74512105f4fe06513dee5af47aac1a0837cca2 Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 26 Aug 2014 22:33:54 +1000 Subject: [PATCH] Fix Kohana:: for CLI operation --- application/bootstrap.php | 6 ++++++ includes/kohana | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/application/bootstrap.php b/application/bootstrap.php index 6b792784..dbe25e5b 100644 --- a/application/bootstrap.php +++ b/application/bootstrap.php @@ -69,6 +69,12 @@ I18n::lang('en-us'); * Note: If you supply an invalid environment name, a PHP warning will be thrown * saying "Couldn't find constant Kohana::" */ + +/** + * 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; + if (isset($_SERVER['KOHANA_ENV'])) { Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV'])); diff --git a/includes/kohana b/includes/kohana index f5c623d8..5ffa3953 160000 --- a/includes/kohana +++ b/includes/kohana @@ -1 +1 @@ -Subproject commit f5c623d89783fc9bf3c8dbea7699fcefa0015c3d +Subproject commit 5ffa395307a3b26f901dde5f3064c48a15979f0d