summaryrefslogtreecommitdiffstats
path: root/system/database/DB.php
diff options
context:
space:
mode:
authorRene Brokholm <rb@viptel.dk>2012-07-05 09:05:32 +0200
committerRene Brokholm <rb@viptel.dk>2012-07-05 09:05:32 +0200
commitf5a8530cc937d193aa928bc25f2970eae772d6ef (patch)
tree2b8adc23917be4faad92b26f84bd4da28f137eb8 /system/database/DB.php
parentd6d1858e5cdc0caa3f20e558c67c0a27f9a65796 (diff)
code cleanup and changelog added
Diffstat (limited to 'system/database/DB.php')
-rw-r--r--system/database/DB.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/system/database/DB.php b/system/database/DB.php
index fd5cf5516..3044ce517 100644
--- a/system/database/DB.php
+++ b/system/database/DB.php
@@ -49,19 +49,19 @@ function &DB($params = '', $query_builder_override = NULL)
include($file_path);
//make packages contain database config files
foreach(get_instance()->load->get_package_paths() as $path)
- {
- if ($path != APPPATH)
- {
- if ( file_exists($file_path = $path.'config/'.ENVIRONMENT.'/database.php'))
- {
- include($file_path);
- }
- elseif ( file_exists($file_path = $path.'config/database.php'))
- {
- include($file_path);
- }
- }
- }
+ {
+ if ($path !== APPPATH)
+ {
+ if (file_exists ($file_path = $path.'config/'.ENVIRONMENT.'/database.php'))
+ {
+ include ($file_path);
+ }
+ elseif ( file_exists ($file_path = $path.'config/database.php'))
+ {
+ include ($file_path);
+ }
+ }
+ }
if ( ! isset($db) OR count($db) === 0)
{