And while I'm a it:
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 2 Oct 2010 21:58:04 +0000 (21:58 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 2 Oct 2010 21:58:04 +0000 (21:58 +0000)
* Fixed E_STRICT about different signature of TextPassDumper::dump() and BackupDumper::dump()
* Add the possibility to show the help message...

maintenance/dumpTextPass.php

index ee2fbcc..33413a0 100644 (file)
@@ -50,7 +50,7 @@ class TextPassDumper extends BackupDumper {
        var $spawnRead = false;
        var $spawnErr = false;
 
-       function dump() {
+       function dump( $history, $text = WikiExporter::TEXT ) {
                # This shouldn't happen if on console... ;)
                header( 'Content-type: text/html; charset=UTF-8' );
 
@@ -467,8 +467,8 @@ class TextPassDumper extends BackupDumper {
 
 $dumper = new TextPassDumper( $argv );
 
-if ( true ) {
-       $dumper->dump();
+if ( !isset( $options['help'] ) ) {
+       $dumper->dump( true );
 } else {
        $dumper->progress( <<<ENDS
 This script postprocesses XML dumps from dumpBackup.php to add
@@ -489,6 +489,7 @@ Options:
   --server=h  Force reading from MySQL server h
   --current      Base ETA on number of pages in database instead of all revisions
   --spawn        Spawn a subprocess for loading text records
+  --help      Display this help message
 ENDS
 );
 }