Change the default user from 'root' to 'postgres' if using a PostgreSQL backend.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Mon, 21 Mar 2011 14:59:14 +0000 (14:59 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Mon, 21 Mar 2011 14:59:14 +0000 (14:59 +0000)
There may be a better way to do this, so comments welcome.

includes/installer/PostgresInstaller.php

index 36dab2f..bf6d8d4 100644 (file)
@@ -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' ) .