From: Greg Sabino Mullane Date: Mon, 21 Mar 2011 14:59:14 +0000 (+0000) Subject: Change the default user from 'root' to 'postgres' if using a PostgreSQL backend. X-Git-Tag: 1.31.0-rc.0~31275 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=b694d74c80c86964571c42b29da0f33994acc2cc;p=lhc%2Fweb%2Fwiklou.git Change the default user from 'root' to 'postgres' if using a PostgreSQL backend. There may be a better way to do this, so comments welcome. --- diff --git a/includes/installer/PostgresInstaller.php b/includes/installer/PostgresInstaller.php index 36dab2f36e..bf6d8d4086 100644 --- a/includes/installer/PostgresInstaller.php +++ b/includes/installer/PostgresInstaller.php @@ -35,6 +35,11 @@ class PostgresInstaller extends DatabaseInstaller { } function getConnectForm() { + // If this is our first time here, switch the default user presented in the form + if ( ! $this->getVar('_switchedInstallUser') ) { + $this->setVar('_InstallUser', 'postgres'); + $this->setVar('_switchedInstallUser', true); + } return $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) . $this->getTextBox( 'wgDBport', 'config-db-port' ) .