Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Be consistent with capitalization of PDO driver names
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Jun 27, 2014
1 parent d11847a commit dcb26ac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions core/configs/database.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[production]
database.type = pdo
database.profiler = 0
database.adapter = Pdo_Mysql
database.adapter = PDO_MYSQL
database.params.host = localhost
database.params.port = 3306
database.params.username = root
Expand All @@ -11,7 +11,7 @@ database.params.dbname = midas
[development]
database.type = pdo
database.profiler = 1
database.adapter = Pdo_Mysql
database.adapter = PDO_MYSQL
database.params.host = localhost
database.params.port = 3306
database.params.username = root
Expand All @@ -21,7 +21,7 @@ database.params.dbname = midas
[testing]
database.type = pdo
database.profiler = 1
database.adapter = Pdo_Mysql
database.adapter = PDO_MYSQL
database.params.host = localhost
database.params.port = 3306
database.params.username = root
Expand Down
6 changes: 3 additions & 3 deletions core/controllers/InstallController.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function step2Action()
$databaseConfig['development']['database.params.port'] = $form->getValue('port');
$databaseConfig['production']['database.params.port'] = $form->getValue('port');

$db = Zend_Db::factory('Pdo_Mysql', $params);
$db = Zend_Db::factory('PDO_MYSQL', $params);
Zend_Db_Table::setDefaultAdapter($db);
Zend_Registry::set('dbAdapter', $db);

Expand Down Expand Up @@ -186,7 +186,7 @@ function step2Action()
$databaseConfig['development']['database.params.port'] = $form->getValue('port');
$databaseConfig['production']['database.params.port'] = $form->getValue('port');

$db = Zend_Db::factory('Pdo_Pgsql', $params);
$db = Zend_Db::factory('PDO_PGSQL', $params);
Zend_Db_Table::setDefaultAdapter($db);
Zend_Registry::set('dbAdapter', $db);
$dbtype = 'PDO_PGSQL';
Expand Down Expand Up @@ -301,7 +301,7 @@ public function testconnectionAction()
$this->_helper->viewRenderer->setNoRender();
try
{
$db = Zend_Db::factory('Pdo_' . ucfirst($this->_getParam('type')), array(
$db = Zend_Db::factory('PDO_' . strtoupper($this->_getParam('type')), array(
'host' => $this->_getParam('host'),
'port' => $this->_getParam('port'),
'username' => $this->_getParam('username'),
Expand Down
4 changes: 2 additions & 2 deletions core/controllers/components/UtilityComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,13 @@ static function run_query_from_file($adapter, $sqlfile, $host, $username, $passw
/** Function to run a MySQL script */
static function run_mysql_from_file($sqlfile, $host, $username, $password, $dbname, $port)
{
return self::run_query_from_file('Pdo_Mysql', $sqlfile, $host, $username, $password, $dbname, $port);
return self::run_query_from_file('PDO_MYSQL', $sqlfile, $host, $username, $password, $dbname, $port);
}

/** Function to run a PostgreSQL script */
static function run_pgsql_from_file($sqlfile, $host, $username, $password, $dbname, $port)
{
return self::run_query_from_file('Pdo_Pgsql', $sqlfile, $host, $username, $password, $dbname, $port);
return self::run_query_from_file('PDO_PGSQL', $sqlfile, $host, $username, $password, $dbname, $port);
}

/** Get the data directory */
Expand Down

0 comments on commit dcb26ac

Please sign in to comment.