From dcb26ac1f96eb25caa0a0e3ecfd614ea777b4c73 Mon Sep 17 00:00:00 2001 From: Jamie Snape Date: Fri, 27 Jun 2014 10:25:11 -0400 Subject: [PATCH] Be consistent with capitalization of PDO driver names --- core/configs/database.ini | 6 +++--- core/controllers/InstallController.php | 6 +++--- core/controllers/components/UtilityComponent.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/configs/database.ini b/core/configs/database.ini index 6bd459622..24bb1d6f7 100644 --- a/core/configs/database.ini +++ b/core/configs/database.ini @@ -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 @@ -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 @@ -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 diff --git a/core/controllers/InstallController.php b/core/controllers/InstallController.php index 6ed40dcc0..03118a912 100644 --- a/core/controllers/InstallController.php +++ b/core/controllers/InstallController.php @@ -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); @@ -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'; @@ -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'), diff --git a/core/controllers/components/UtilityComponent.php b/core/controllers/components/UtilityComponent.php index 788a997aa..ab62e010f 100644 --- a/core/controllers/components/UtilityComponent.php +++ b/core/controllers/components/UtilityComponent.php @@ -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 */