Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let's follow the style guide... #1991

Merged
merged 1 commit into from Nov 12, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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