diff options
author | Taufan Aditya <toopay@taufanaditya.com> | 2012-03-30 01:29:11 +0200 |
---|---|---|
committer | Taufan Aditya <toopay@taufanaditya.com> | 2012-03-30 01:29:11 +0200 |
commit | ee2f5d08c64d96b7abc7195bcd1b6a3fd67b5b42 (patch) | |
tree | 133e61f62e6213361713b8ff9b1690afb9daded2 /system | |
parent | dba9437218a5d8bedb75464b943e8f920d220a25 (diff) |
Multi database setup
Diffstat (limited to 'system')
-rwxr-xr-x | system/database/DB.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/system/database/DB.php b/system/database/DB.php index e9434231c..0d81e40d3 100755 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -92,16 +92,12 @@ function &DB($params = '', $active_record_override = NULL) if (isset($dsn['query'])) { parse_str($dsn['query'], $extra); + foreach ($extra as $key => $val) { - // booleans please - if (strtoupper($val) === 'TRUE') - { - $val = TRUE; - } - elseif (strtoupper($val) === 'FALSE') + if (is_string($val) && in_array(strtoupper($val), array('TRUE', 'FALSE', 'NULL'))) { - $val = FALSE; + $val = var_export($val); } $params[$key] = $val; |