Created
November 1, 2011 13:25
-
-
Save cbandy/1330489 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/classes/kohana/config/database/reader.php b/classes/kohana/config/database/reader.php | |
| index 9366a2a..f9899dd 100644 | |
| --- a/classes/kohana/config/database/reader.php | |
| +++ b/classes/kohana/config/database/reader.php | |
| @@ -53,7 +53,7 @@ class Kohana_Config_Database_Reader implements Kohana_Config_Reader | |
| * | |
| * @link http://dev.kohanaframework.org/issues/4316 | |
| */ | |
| - if ($group === 'database') | |
| + if ($group === Database::CONFIG) | |
| return FALSE; | |
| $query = DB::select('config_key', 'config_value') | |
| diff --git a/classes/kohana/database.php b/classes/kohana/database.php | |
| index 209d38d..8300530 100644 | |
| --- a/classes/kohana/database.php | |
| +++ b/classes/kohana/database.php | |
| @@ -16,7 +16,14 @@ | |
| * @copyright (c) 2008-2010 Kohana Team | |
| * @license http://kohanaphp.com/license | |
| */ | |
| -abstract class Kohana_Database { | |
| +abstract class Kohana_Database | |
| +{ | |
| + /** | |
| + * Name of the [Config_Group] to load | |
| + * | |
| + * @see Database::instance() | |
| + */ | |
| + const CONFIG = 'database'; | |
| // Query types | |
| const SELECT = 1; | |
| @@ -62,7 +69,7 @@ abstract class Kohana_Database { | |
| if ($config === NULL) | |
| { | |
| // Load the configuration for this database | |
| - $config = Kohana::$config->load('database')->$name; | |
| + $config = Kohana::$config->load(Database::CONFIG)->$name; | |
| } | |
| if ( ! isset($config['type'])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment