r84450 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84449‎ | r84450 | r84451 >
Date:14:59, 21 March 2011
Author:greg
Status:ok (Comments)
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/includes/installer/PostgresInstaller.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/PostgresInstaller.php
@@ -35,6 +35,11 @@
3636 }
3737
3838 function getConnectForm() {
 39+ // If this is our first time here, switch the default user presented in the form
 40+ if ( ! $this->getVar('_switchedInstallUser') ) {
 41+ $this->setVar('_InstallUser', 'postgres');
 42+ $this->setVar('_switchedInstallUser', true);
 43+ }
3944 return
4045 $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
4146 $this->getTextBox( 'wgDBport', 'config-db-port' ) .

Comments

#Comment by 😂 (talk | contribs)   15:16, 21 March 2011

This will do for now, there's not a better way yet (Oracle has the same problem, their admin account is 'sysdba' iirc)

Status & tagging log