summaryrefslogtreecommitdiffstats
path: root/system/database/DB.php
diff options
context:
space:
mode:
authorvkeranov <vkeranov@gmail.com>2012-11-12 13:29:49 +0100
committervkeranov <vkeranov@gmail.com>2012-11-12 13:29:49 +0100
commitd008c9783d4d3f271cabc11af290d5e0203697e5 (patch)
treebc5ca18dc8bcfcff598192ef1574dc8590837da3 /system/database/DB.php
parent12d7b468d907c73abac3e3711b2f53c2fce25199 (diff)
Let's follow the style guide...
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 79e5c7ad2..f4062fa73 100644
--- a/system/database/DB.php
+++ b/system/database/DB.php
@@ -50,18 +50,18 @@ 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)
+ // 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'))
+ if (file_exists($file_path = $path.'config/'.ENVIRONMENT.'/database.php'))
{
- include ($file_path);
+ include($file_path);
}
- elseif ( file_exists ($file_path = $path.'config/database.php'))
+ elseif (file_exists($file_path = $path.'config/database.php'))
{
- include ($file_path);
+ include($file_path);
}
}
}
@@ -85,12 +85,12 @@ function &DB($params = '', $query_builder_override = NULL)
}
elseif (is_string($params))
{
-
- /* parse the URL from the DSN string
- * Database settings can be passed as discreet
- * parameters or as a data source name in the first
- * parameter. DSNs must have this prototype:
- * $dsn = 'driver://username:password@hostname/database';
+ /**
+ * Parse the URL from the DSN string
+ * Database settings can be passed as discreet
+ * parameters or as a data source name in the first
+ * parameter. DSNs must have this prototype:
+ * $dsn = 'driver://username:password@hostname/database';
*/
if (($dsn = @parse_url($params)) === FALSE)
{
@@ -106,7 +106,7 @@ function &DB($params = '', $query_builder_override = NULL)
'database' => isset($dsn['path']) ? rawurldecode(substr($dsn['path'], 1)) : ''
);
- // were additional config items set?
+ // Were additional config items set?
if (isset($dsn['query']))
{
parse_str($dsn['query'], $extra);