summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-01-30 21:26:25 +0100
committerDerek Jones <derek.jones@ellislab.com>2008-01-30 21:26:25 +0100
commit75d568db823b8fe7526e416f5e3f1c2c235f5473 (patch)
treeb2e37d724cbdc56c345a2e7306539870c5c76c88 /system
parentf653a2fe2f82130ff9d8db6a4913b4823dd81424 (diff)
removed 'active_r' db config variable, replaced with global $active_record setting. (bug report #1834)
Diffstat (limited to 'system')
-rw-r--r--system/application/config/database.php4
-rw-r--r--system/database/DB.php8
2 files changed, 7 insertions, 5 deletions
diff --git a/system/application/config/database.php b/system/application/config/database.php
index 59b973981..472affbe5 100644
--- a/system/application/config/database.php
+++ b/system/application/config/database.php
@@ -22,7 +22,6 @@
| to the table name when using the Active Record class
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
-| ['active_r'] TRUE/FALSE - Whether to load the active record class
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
| ['cachedir'] The path to the folder where cache files should be stored
| ['char_set'] The character set used in communicating with the database
@@ -31,9 +30,12 @@
| The $active_group variable lets you choose which connection group to
| make active. By default there is only one group (the "default" group).
|
+| The $active_record variables lets you determine whether or not to load
+| the active record class
*/
$active_group = "default";
+$active_record = TRUE;
$db['default']['hostname'] = "localhost";
$db['default']['username'] = "";
diff --git a/system/database/DB.php b/system/database/DB.php
index abd782c34..8f25e5e1a 100644
--- a/system/database/DB.php
+++ b/system/database/DB.php
@@ -22,7 +22,7 @@
* @author ExpressionEngine Dev Team
* @link http://codeigniter.com/user_guide/database/
*/
-function &DB($params = '', $active_record = FALSE)
+function &DB($params = '', $active_record_override = FALSE)
{
// Load the DB config file if a DSN string wasn't passed
if (is_string($params) AND strpos($params, '://') === FALSE)
@@ -58,14 +58,14 @@ function &DB($params = '', $active_record = FALSE)
// based on whether we're using the active record class or not.
// Kudos to Paul for discovering this clever use of eval()
- if ($active_record == TRUE)
+ if ($active_record_override == TRUE)
{
- $params['active_r'] = TRUE;
+ $active_record = TRUE;
}
require_once(BASEPATH.'database/DB_driver'.EXT);
- if ( ! isset($params['active_r']) OR $params['active_r'] == TRUE)
+ if ($active_record == TRUE)
{
require_once(BASEPATH.'database/DB_active_rec'.EXT);