From 2f17b76d4b278669c631beb95bd3e9d93983e7ef Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 29 Oct 2008 09:24:45 +0000 Subject: [PATCH] MDL-17057 dml: fixed regression changed by removed dbpersist parameter - sorrrry --- admin/cliupgrade.php | 4 ++-- admin/dbtransfer/index.php | 2 +- admin/generator.php | 2 +- install.php | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/admin/cliupgrade.php b/admin/cliupgrade.php index a4c81aa7c2..2a819321c8 100644 --- a/admin/cliupgrade.php +++ b/admin/cliupgrade.php @@ -464,12 +464,12 @@ if (!file_exists(dirname(dirname(__FILE__)) . '/config.php')) { if (empty($errormsg)) { error_reporting(0); // Hide errors - if (! $dbconnected = $DB->connect($INSTALL['dbhost'], $INSTALL['dbuser'], $INSTALL['dbpass'], $INSTALL['dbname'], false, $INSTALL['prefix'])) { + if (! $dbconnected = $DB->connect($INSTALL['dbhost'], $INSTALL['dbuser'], $INSTALL['dbpass'], $INSTALL['dbname'], $INSTALL['prefix'])) { if (!$DB->create_database($INSTALL['dbhost'], $INSTALL['dbuser'], $INSTALL['dbpass'], $INSTALL['dbname'])) { $errormsg = get_string('dbcreationerror', 'install'); $nextstage = DATABASE; } else { - $dbconnected = $DB->connect($INSTALL['dbhost'], $INSTALL['dbuser'], $INSTALL['dbpass'], $INSTALL['dbname'], false, $INSTALL['prefix']); + $dbconnected = $DB->connect($INSTALL['dbhost'], $INSTALL['dbuser'], $INSTALL['dbpass'], $INSTALL['dbname'], $INSTALL['prefix']); } } else { // TODO: db encoding checks ?? diff --git a/admin/dbtransfer/index.php b/admin/dbtransfer/index.php index cb25530dbe..66bc1d8fae 100644 --- a/admin/dbtransfer/index.php +++ b/admin/dbtransfer/index.php @@ -13,7 +13,7 @@ $form = new database_transfer_form(); if ($data = $form->get_data()) { list($dbtype, $dblibrary) = explode('/', $data->driver); $targetdb = moodle_database::get_driver_instance($dbtype, $dblibrary); - if (!$targetdb->connect($data->dbhost, $data->dbuser, $data->dbpass, $data->dbname, false, $data->prefix, null)) { + if (!$targetdb->connect($data->dbhost, $data->dbuser, $data->dbpass, $data->dbname, $data->prefix, null)) { throw new dbtransfer_exception('notargetconectexception', null, "$CFG->wwwroot/$CFG->admin/dbtransfer/"); } if ($targetdb->get_tables()) { diff --git a/admin/generator.php b/admin/generator.php index b5aa018516..68a55b6b44 100755 --- a/admin/generator.php +++ b/admin/generator.php @@ -162,7 +162,7 @@ class generator { $class = get_class($DB); $DB = new $class(); - $DB->connect($CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, true, $this->get('database_prefix')); + $DB->connect($CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $this->get('database_prefix')); } public function generate_users() { diff --git a/install.php b/install.php index 60e5a30c2f..8558dcbe38 100644 --- a/install.php +++ b/install.php @@ -324,12 +324,12 @@ if ($INSTALL['stage'] == DATABASE) { if (empty($errormsg)) { error_reporting(0); // Hide errors - if (! $dbconnected = $DB->connect($INSTALL['dbhost'], $INSTALL['dbuser'], $INSTALL['dbpass'], $INSTALL['dbname'], false, $INSTALL['prefix'])) { + if (! $dbconnected = $DB->connect($INSTALL['dbhost'], $INSTALL['dbuser'], $INSTALL['dbpass'], $INSTALL['dbname'], $INSTALL['prefix'])) { if (!$DB->create_database($INSTALL['dbhost'], $INSTALL['dbuser'], $INSTALL['dbpass'], $INSTALL['dbname'])) { $errormsg = get_string('dbcreationerror', 'install'); $nextstage = DATABASE; } else { - $dbconnected = $DB->connect($INSTALL['dbhost'], $INSTALL['dbuser'], $INSTALL['dbpass'], $INSTALL['dbname'], false, $INSTALL['prefix']); + $dbconnected = $DB->connect($INSTALL['dbhost'], $INSTALL['dbuser'], $INSTALL['dbpass'], $INSTALL['dbname'], $INSTALL['prefix']); } } else { // TODO: db encoding checks ?? @@ -376,7 +376,7 @@ if ($INSTALL['stage'] == ENVIRONMENT) { $DB = $databases[$INSTALL['dbtype']]; error_reporting(0); // Hide errors - $dbconnected = $DB->connect($INSTALL['dbhost'], $INSTALL['dbuser'], $INSTALL['dbpass'], $INSTALL['dbname'], false, $INSTALL['prefix']); + $dbconnected = $DB->connect($INSTALL['dbhost'], $INSTALL['dbuser'], $INSTALL['dbpass'], $INSTALL['dbname'], $INSTALL['prefix']); error_reporting(38911); // Show errors if ($dbconnected) { /// Execute environment check, printing results @@ -789,7 +789,7 @@ function form_table($nextstage, $formaction, $databases) { connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname'], false, $INSTALL['prefix']); + $dbconnected = $DB->connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname'], $INSTALL['prefix']); error_reporting(38911); // Show errors if ($dbconnected) { /// Execute environment check, printing results -- 2.39.5