summaryrefslogtreecommitdiff
path: root/maintenance/install.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
commitca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch)
treeec04cc15b867bc21eedca904cea9af0254531a11 /maintenance/install.php
parenta22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff)
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing
Diffstat (limited to 'maintenance/install.php')
-rw-r--r--maintenance/install.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/maintenance/install.php b/maintenance/install.php
index 34e3ea85..dba43400 100644
--- a/maintenance/install.php
+++ b/maintenance/install.php
@@ -40,7 +40,7 @@ class CommandLineInstaller extends Maintenance {
$this->addArg( 'admin', 'The username of the wiki administrator (WikiSysop)', true );
$this->addOption( 'pass', 'The password for the wiki administrator. You will be prompted for this if it isn\'t provided', false, true );
- $this->addOption( 'email', 'The email for the wiki administrator', false, true );
+ /* $this->addOption( 'email', 'The email for the wiki administrator', false, true ); */
$this->addOption( 'scriptpath', 'The relative path of the wiki in the web server (/wiki)', false, true );
$this->addOption( 'lang', 'The language to use (en)', false, true );
@@ -55,6 +55,7 @@ class CommandLineInstaller extends Maintenance {
$this->addOption( 'installdbpass', 'The pasword for the DB user to install as.', false, true );
$this->addOption( 'dbuser', 'The user to use for normal operations (wikiuser)', false, true );
$this->addOption( 'dbpass', 'The pasword for the DB user for normal operations', false, true );
+ $this->addOption( 'dbpassfile', 'An alternative way to provide dbpass option, as the contents of this file', false, true );
$this->addOption( 'confpath', "Path to write LocalSettings.php to, default $IP", false, true );
/* $this->addOption( 'dbschema', 'The schema for the MediaWiki DB in pg (mediawiki)', false, true ); */
/* $this->addOption( 'namespace', 'The project namespace (same as the name)', false, true ); */
@@ -67,6 +68,17 @@ class CommandLineInstaller extends Maintenance {
$adminName = isset( $this->mArgs[1] ) ? $this->mArgs[1] : null;
$wgTitle = Title::newFromText( 'Installer script' );
+ $dbpassfile = $this->getOption( 'dbpassfile', false );
+ if ( $dbpassfile !== false ) {
+ wfSuppressWarnings();
+ $dbpass = file_get_contents( $dbpassfile );
+ wfRestoreWarnings();
+ if ( $dbpass === false ) {
+ $this->error( "Couldn't open $dbpassfile", true );
+ }
+ $this->mOptions['dbpass'] = trim( $dbpass, "\r\n" );
+ }
+
$installer =
new CliInstaller( $siteName, $adminName, $this->mOptions );