Skip to content

Commit

Permalink
fixed test case in install process on db credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
s3inlc committed Mar 2, 2017
1 parent 9732520 commit 3b4dcf5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/dba/AbstractModelFactory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -682,9 +682,16 @@ public function massUpdate($options) {
* @return PDO
*/
public function getDB($test = false) {
$dsn = 'mysql:dbname=' . DBA_DB . ";" . "host=" . DBA_SERVER;
$user = DBA_USER;
$password = DBA_PASS;
if(!$test) {
$dsn = 'mysql:dbname=' . DBA_DB . ";" . "host=" . DBA_SERVER;
$user = DBA_USER;
$password = DBA_PASS;
}else{
global $CONN;
$dsn = 'mysql:dbname=' . $CONN['db'] . ";" . "host=" . $CONN['server'];
$user = $CONN['user'];
$password = $CONN['pass'];
}

if ($this->dbh !== null) {
return $this->dbh;
Expand Down

0 comments on commit 3b4dcf5

Please sign in to comment.