* (bug 26023) Corrected deleteBacth.php's documentation
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 20 Nov 2010 11:11:20 +0000 (11:11 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 20 Nov 2010 11:11:20 +0000 (11:11 +0000)
RELEASE-NOTES
maintenance/Maintenance.php
maintenance/deleteBatch.php

index 3cd04ed..80afa03 100644 (file)
@@ -432,6 +432,7 @@ LocalSettings.php. The specific bugs are listed below in the general notes.
 * (bug 20591) There's now a different message on Special:MovePage when
   $wgFixDoubleRedirects is set to false.
 * Fixed PHP warnings when updating a broken MySQL database.
+* (bug 26023) Corrected deleteBacth.php's documentation
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent.
index 19c6a3c..b43742f 100644 (file)
@@ -673,11 +673,15 @@ abstract class Maintenance {
 
                // ... and append arguments.
                if ( $this->mArgList ) {
-                       $output .= " <";
+                       $output .= ' ';
                        foreach ( $this->mArgList as $k => $arg ) {
-                               $output .= $arg['name'] . ">";
+                               if ( $arg['require'] ) {
+                                       $output .= '<' . $arg['name'] . '>';
+                               } else {
+                                       $output .= '[' . $arg['name'] . ']';
+                               }
                                if ( $k < count( $this->mArgList ) - 1 )
-                                       $output .= " <";
+                                       $output .= ' ';
                        }
                }
                $this->output( "$output\n\n" );
@@ -692,8 +696,10 @@ abstract class Maintenance {
 
                // Arguments description
                foreach ( $this->mArgList as $info ) {
+                       $openChar = $info['require'] ? '<' : '[';
+                       $closeChar = $info['require'] ? '>' : ']';
                        $this->output(
-                               wordwrap( "$tab<" . $info['name'] . ">: " .
+                               wordwrap( "$tab$openChar" . $info['name'] . "$closeChar: " .
                                        $info['desc'], $descWidth, "\n$tab$tab" ) . "\n"
                        );
                }
index 120ed7e..9571bde 100644 (file)
@@ -37,7 +37,8 @@ class DeleteBatch extends Maintenance {
                $this->addOption( 'u', "User to perform deletion", false, true );
                $this->addOption( 'r', "Reason to delete page", false, true );
                $this->addOption( 'i', "Interval to sleep between deletions" );
-               $this->addArg( 'listfile', 'File with titles to delete, separated by newlines', false );
+               $this->addArg( 'listfile', 'File with titles to delete, separated by newlines. ' .
+                       'If not given, stdin will be used.', false );
        }
        
        public function execute() {