From 22c7d8235103c412ec8f741fb3efe4f880ef6cb0 Mon Sep 17 00:00:00 2001 From: jan Date: Sat, 6 Oct 2012 00:28:39 +0200 Subject: [PATCH] Add warnings to install.php for files-options Add warnings to install.php if dbpass and dbpassfile or pass and passfile is provided. Change-Id: Ibf73ddd80eebbd9886e18cee8eaf32b7127b660f --- maintenance/install.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/maintenance/install.php b/maintenance/install.php index 365791e986..39e613f37f 100644 --- a/maintenance/install.php +++ b/maintenance/install.php @@ -78,6 +78,9 @@ class CommandLineInstaller extends Maintenance { $dbpassfile = $this->getOption( 'dbpassfile', false ); if ( $dbpassfile !== false ) { + if ( $this->getOption( 'dbpass', false ) !== false ) { + $this->error( 'WARNING: You provide the options "dbpass" and "dbpassfile". The content of "dbpassfile" overwrites "dbpass".' ); + } wfSuppressWarnings(); $dbpass = file_get_contents( $dbpassfile ); wfRestoreWarnings(); @@ -89,6 +92,9 @@ class CommandLineInstaller extends Maintenance { $passfile = $this->getOption( 'passfile', false ); if ( $passfile !== false ) { + if ( $this->getOption( 'pass', false ) !== false ) { + $this->error( 'WARNING: You provide the options "pass" and "passfile". The content of "passfile" overwrites "pass".' ); + } wfSuppressWarnings(); $pass = file_get_contents( $passfile ); wfRestoreWarnings(); @@ -97,7 +103,7 @@ class CommandLineInstaller extends Maintenance { } $this->mOptions['pass'] = str_replace( array( "\n", "\r" ), "", $pass ); } elseif ( $this->getOption( 'pass', false ) === false ) { - $this->error( "You need to provide the option pass or passfile", true ); + $this->error( 'You need to provide the option "pass" or "passfile"', true ); } $installer = -- 2.20.1