http://www.mediawiki.org/wiki/Special:Code/MediaWiki/54501
Revision: 54501 Author: demon Date: 2009-08-06 00:32:50 +0000 (Thu, 06 Aug 2009) Log Message: ----------- Clean up missing param error, show help on die. -params are still kind of wonky. Could use a second set of eyes. Modified Paths: -------------- trunk/phase3/maintenance/Maintenance.php Modified: trunk/phase3/maintenance/Maintenance.php =================================================================== --- trunk/phase3/maintenance/Maintenance.php 2009-08-06 00:20:49 UTC (rev 54500) +++ trunk/phase3/maintenance/Maintenance.php 2009-08-06 00:32:50 UTC (rev 54501) @@ -413,7 +413,8 @@ if ( isset( $this->mParams[$option] ) && $this->mParams[$option]['withArg'] ) { $param = next( $argv ); if ( $param === false ) { - $this->error( "$arg needs a value after it", true ); + $this->error( "\nERROR: $option needs a value after it\n" ); + $this->maybeHelp( true ); } $options[$option] = $param; } else { @@ -433,7 +434,8 @@ if ( $this->mParams[$option]['withArg'] ) { $param = next( $argv ); if ( $param === false ) { - $this->error( "$arg needs a value after it", true ); + $this->error( "\nERROR: $option needs a value after it\n" ); + $this->maybeHelp( true ); } $options[$option] = $param; } else { _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs