Skip to content

Commit

Permalink
Merge pull request #1991 from vkeranov/develop
Browse files Browse the repository at this point in the history
Let's follow the style guide...
  • Loading branch information
narfbg committed Nov 12, 2012
2 parents 12d7b46 + d008c97 commit a9ab46d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions system/database/DB.php
Expand Up @@ -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);
}
}
}
Expand All @@ -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)
{
Expand All @@ -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);
Expand Down

0 comments on commit a9ab46d

Please sign in to comment.