X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdumpBackup.php;h=18c78dcda72dada2a398c36edb26e6ed7a485e93;hb=9f7e79ab6ba0fd3a0e4b002ca46b600a4a880a75;hp=463846872b2a5925c211cf39df855712736e061a;hpb=01f36b721f6fb60000b625fd681993d50ebd0e40;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/dumpBackup.php b/maintenance/dumpBackup.php index 463846872b..18c78dcda7 100644 --- a/maintenance/dumpBackup.php +++ b/maintenance/dumpBackup.php @@ -4,7 +4,7 @@ * wrapper format for export or backup * * Copyright © 2005 Brion Vibber - * http://www.mediawiki.org/ + * https://www.mediawiki.org/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,10 +27,10 @@ $originalDir = getcwd(); -$optionsWithArgs = array( 'pagelist', 'start', 'end', 'revstart', 'revend'); +$optionsWithArgs = array( 'pagelist', 'start', 'end', 'revstart', 'revend' ); -require_once( dirname( __FILE__ ) . '/commandLine.inc' ); -require_once( dirname( __FILE__ ) . '/backup.inc' ); +require_once __DIR__ . '/commandLine.inc'; +require_once __DIR__ . '/backup.inc'; $dumper = new BackupDumper( $argv ); @@ -44,8 +44,8 @@ if ( isset( $options['pagelist'] ) ) { $pages = file( $options['pagelist'] ); chdir( $olddir ); if ( $pages === false ) { - echo( "Unable to open file {$options['pagelist']}\n" ); - die(1); + echo "Unable to open file {$options['pagelist']}\n"; + die( 1 ); } $pages = array_map( 'trim', $pages ); $dumper->pages = array_filter( $pages, create_function( '$x', 'return $x !== "";' ) ); @@ -79,7 +79,7 @@ if ( isset( $options['full'] ) ) { $dumper->dump( WikiExporter::STABLE, $textMode ); } elseif ( isset( $options['logs'] ) ) { $dumper->dump( WikiExporter::LOGS ); -} elseif ( isset($options['revrange'] ) ) { +} elseif ( isset( $options['revrange'] ) ) { $dumper->dump( WikiExporter::RANGE, $textMode ); } else { $dumper->progress( <<[:] Add a filter on an output branch ENDS -); + ); }