MDL-15320 fixed $cfg->library typo - thanks Andrei Bautu

This commit is contained in:
skodak 2008-06-20 20:30:29 +00:00
parent fd45e5c37b
commit 4dd3bf0584
2 changed files with 18 additions and 18 deletions

View File

@ -28,13 +28,13 @@ abstract class adodb_moodle_database extends moodle_database {
*/
public function export_dbconfig() {
$cfg = new stdClass();
$cfg->dbtype = $this->get_dbtype();
$cfg->library = 'adodb';
$cfg->dbhost = $this->dbhost;
$cfg->dbname = $this->dbname;
$cfg->dbuser = $this->dbuser;
$cfg->dbpass = $this->dbpass;
$cfg->prefix = $this->prefix;
$cfg->dbtype = $this->get_dbtype();
$cfg->dblibrary = 'adodb';
$cfg->dbhost = $this->dbhost;
$cfg->dbname = $this->dbname;
$cfg->dbuser = $this->dbuser;
$cfg->dbpass = $this->dbpass;
$cfg->prefix = $this->prefix;
return $cfg;
}

View File

@ -74,20 +74,20 @@ class postgres7_adodb_moodle_database extends adodb_moodle_database {
*/
public function export_dbconfig() {
$cfg = new stdClass();
$cfg->dbtype = $this->get_dbtype();
$cfg->library = 'adodb';
$cfg->dbtype = $this->get_dbtype();
$cfg->dblibrary = 'adodb';
if ($this->dbhost == 'localhost' or $this->dbhost == '127.0.0.1') {
$cfg->dbhost = "user='{$this->dbuser}' password='{$this->dbpass}' dbname='{$this->dbname}'";
$cfg->dbname = '';
$cfg->dbuser = '';
$cfg->dbpass = '';
$cfg->dbhost = "user='{$this->dbuser}' password='{$this->dbpass}' dbname='{$this->dbname}'";
$cfg->dbname = '';
$cfg->dbuser = '';
$cfg->dbpass = '';
} else {
$cfg->dbhost = $this->dbhost;
$cfg->dbname = $this->dbname;
$cfg->dbuser = $this->dbuser;
$cfg->dbpass = $this->dbpass;
$cfg->dbhost = $this->dbhost;
$cfg->dbname = $this->dbname;
$cfg->dbuser = $this->dbuser;
$cfg->dbpass = $this->dbpass;
}
$cfg->prefix = $this->prefix;
$cfg->prefix = $this->prefix;
return $cfg;
}