summaryrefslogtreecommitdiff
path: root/maintenance/Maintenance.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-12-03 09:20:55 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-12-03 09:20:55 +0100
commita22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (patch)
tree31882fdc36540fecfd62e5011fc38515e504a3db /maintenance/Maintenance.php
parent6ca0c5e0a943b64b4e3d0a11a80c5679f7252e64 (diff)
Update to MediaWiki 1.17.1
Diffstat (limited to 'maintenance/Maintenance.php')
-rw-r--r--maintenance/Maintenance.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php
index d7297e98..24bb7809 100644
--- a/maintenance/Maintenance.php
+++ b/maintenance/Maintenance.php
@@ -565,10 +565,14 @@ abstract class Maintenance {
} elseif ( substr( $arg, 0, 2 ) == '--' ) {
# Long options
$option = substr( $arg, 2 );
+ if ( array_key_exists( $option, $options ) ) {
+ $this->error( "\nERROR: $option parameter given twice\n" );
+ $this->maybeHelp( true );
+ }
if ( isset( $this->mParams[$option] ) && $this->mParams[$option]['withArg'] ) {
$param = next( $argv );
if ( $param === false ) {
- $this->error( "\nERROR: $option needs a value after it\n" );
+ $this->error( "\nERROR: $option parameter needs a value after it\n" );
$this->maybeHelp( true );
}
$options[$option] = $param;
@@ -586,10 +590,14 @@ abstract class Maintenance {
# Short options
for ( $p = 1; $p < strlen( $arg ); $p++ ) {
$option = $arg { $p } ;
+ if ( array_key_exists( $option, $options ) ) {
+ $this->error( "\nERROR: $option parameter given twice\n" );
+ $this->maybeHelp( true );
+ }
if ( isset( $this->mParams[$option]['withArg'] ) && $this->mParams[$option]['withArg'] ) {
$param = next( $argv );
if ( $param === false ) {
- $this->error( "\nERROR: $option needs a value after it\n" );
+ $this->error( "\nERROR: $option parameter needs a value after it\n" );
$this->maybeHelp( true );
}
$options[$option] = $param;