Remove some dead code from the connection manager
This commit is contained in:
parent
e4ca039b3d
commit
908b9f39cd
@ -129,7 +129,7 @@ final class ConnectionManager {
|
||||
$driver = "\\Query\\Drivers\\{$dbtype}\\Driver";
|
||||
|
||||
// Create the database connection
|
||||
$db = ( ! empty($params->user))
|
||||
$db = ! empty($params->user)
|
||||
? new $driver($dsn, $params->user, $params->pass, $options)
|
||||
: new $driver($dsn, '', '', $options);
|
||||
|
||||
@ -184,18 +184,10 @@ final class ConnectionManager {
|
||||
}
|
||||
|
||||
// Create the dsn for the database to connect to
|
||||
if (strtolower($dbtype) === 'firebird')
|
||||
{
|
||||
$dsn = "{$params->host}:{$params->file}";
|
||||
}
|
||||
else if(strtolower($dbtype) === 'sqlite')
|
||||
if(strtolower($dbtype) === 'sqlite')
|
||||
{
|
||||
$dsn = $params->file;
|
||||
}
|
||||
else if(strtolower($dbtype) === 'oci')
|
||||
{
|
||||
$dsn = "dbname=//{$params->host}:{$params->port}/{$params->database}";
|
||||
}
|
||||
else
|
||||
{
|
||||
$dsn = $this->createDsn($dbtype, $params);
|
||||
@ -234,7 +226,7 @@ final class ConnectionManager {
|
||||
|
||||
foreach($params as $key => $val)
|
||||
{
|
||||
if (( ! array_key_exists($key, $skip)) && ( ! empty($val)))
|
||||
if (( ! array_key_exists($key, $skip)) && ! empty($val))
|
||||
{
|
||||
$pairs[] = implode('=', [$key, $val]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user