From: Alexandre Emsenhuber Date: Sat, 29 Jan 2011 09:00:38 +0000 (+0000) Subject: * (bug 27016) Fix for r77638: dumpTextPass.php now consider the "output" parameter X-Git-Tag: 1.31.0-rc.0~32305 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=8eb3b596e06994db08d304d27289cc4b119e561e;p=lhc%2Fweb%2Fwiklou.git * (bug 27016) Fix for r77638: dumpTextPass.php now consider the "output" parameter Also added "output" parameter to the doc since nothing was mentioning it --- diff --git a/maintenance/dumpTextPass.php b/maintenance/dumpTextPass.php index 4f1abc0daf..98d4af0edb 100644 --- a/maintenance/dumpTextPass.php +++ b/maintenance/dumpTextPass.php @@ -157,7 +157,7 @@ class TextPassDumper extends BackupDumper { $reader = new XMLReader(); $reader->open( $this->input ); $writer = new XMLWriter(); - $writer->openURI( 'php://stdout' ); + $writer->openMemory(); while ( $reader->read() ) { @@ -216,8 +216,8 @@ class TextPassDumper extends BackupDumper { } $writer->text( $reader->value ); } + $this->sink->write( $writer->outputMemory() ); } - $writer->flush(); } function getText( $id ) { @@ -451,6 +451,8 @@ Options: --report=n Report position and speed after every n pages processed. (Default: 100) --server=h Force reading from MySQL server h + --output=: Write to a file instead of stdout + s: file, gzip, bzip2, 7zip --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