Skip to content

Commit

Permalink
MDL-17057 dml: fixed regression changed by removed dbpersist paramete…
Browse files Browse the repository at this point in the history
…r - sorrrry
  • Loading branch information
skodak committed Oct 29, 2008
1 parent aa9671c commit 2f17b76
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions admin/cliupgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,12 @@
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 ??
Expand Down
2 changes: 1 addition & 1 deletion admin/dbtransfer/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
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()) {
Expand Down
2 changes: 1 addition & 1 deletion admin/generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function connect() {

$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() {
Expand Down
8 changes: 4 additions & 4 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,12 @@
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 ??
Expand Down Expand Up @@ -376,7 +376,7 @@
$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
Expand Down Expand Up @@ -789,7 +789,7 @@ function form_table($nextstage, $formaction, $databases) {
<td colspan="2">
<?php
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
Expand Down

0 comments on commit 2f17b76

Please sign in to comment.