X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdumpBackup.php;h=6bbd86d542ddb4068e583417124c01a13f3490f8;hb=76d77beeeb107e056823320b8259e7cb5ade642c;hp=190432517ddc94fe7a2e166711bc9ec23448f82a;hpb=480ab87dbc2974ad9465af2808f21bf83397142e;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/dumpBackup.php b/maintenance/dumpBackup.php index 190432517d..6bbd86d542 100644 --- a/maintenance/dumpBackup.php +++ b/maintenance/dumpBackup.php @@ -50,6 +50,8 @@ TEXT $this->addOption( 'stable', 'Dump stable versions of pages' ); $this->addOption( 'revrange', 'Dump range of revisions specified by revstart and ' . 'revend parameters' ); + $this->addOption( 'orderrevs', 'Dump revisions in ascending revision order ' . + '(implies dump of a range of pages)' ); $this->addOption( 'pagelist', 'Dump only pages included in the file', false, true ); // Options @@ -85,7 +87,7 @@ TEXT } elseif ( $this->hasOption( 'revrange' ) ) { $this->dump( WikiExporter::RANGE, $textMode ); } else { - $this->error( 'No valid action specified.', 1 ); + $this->fatalError( 'No valid action specified.' ); } } @@ -102,7 +104,9 @@ TEXT $this->fatalError( "Unable to open file {$filename}\n" ); } $pages = array_map( 'trim', $pages ); - $this->pages = array_filter( $pages, create_function( '$x', 'return $x !== "";' ) ); + $this->pages = array_filter( $pages, function ( $x ) { + return $x !== ''; + } ); } if ( $this->hasOption( 'start' ) ) { @@ -125,8 +129,9 @@ TEXT $this->skipFooter = $this->hasOption( 'skip-footer' ); $this->dumpUploads = $this->hasOption( 'uploads' ); $this->dumpUploadFileContents = $this->hasOption( 'include-files' ); + $this->orderRevs = $this->hasOption( 'orderrevs' ); } } -$maintClass = 'DumpBackup'; +$maintClass = DumpBackup::class; require_once RUN_MAINTENANCE_IF_MAIN;