summaryrefslogtreecommitdiff
path: root/maintenance/importDump.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /maintenance/importDump.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'maintenance/importDump.php')
-rw-r--r--maintenance/importDump.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/maintenance/importDump.php b/maintenance/importDump.php
index 904b6247..1f47cf12 100644
--- a/maintenance/importDump.php
+++ b/maintenance/importDump.php
@@ -24,7 +24,7 @@
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that imports XML dump files into the current wiki.
@@ -34,16 +34,16 @@ require_once( __DIR__ . '/Maintenance.php' );
class BackupReader extends Maintenance {
public $reportingInterval = 100;
public $pageCount = 0;
- public $revCount = 0;
- public $dryRun = false;
- public $uploads = false;
+ public $revCount = 0;
+ public $dryRun = false;
+ public $uploads = false;
public $imageBasePath = false;
- public $nsFilter = false;
+ public $nsFilter = false;
function __construct() {
parent::__construct();
- $gz = in_array('compress.zlib', stream_get_wrappers()) ? 'ok' : '(disabled; requires PHP zlib module)';
- $bz2 = in_array('compress.bzip2', stream_get_wrappers()) ? 'ok' : '(disabled; requires PHP bzip2 module)';
+ $gz = in_array( 'compress.zlib', stream_get_wrappers() ) ? 'ok' : '(disabled; requires PHP zlib module)';
+ $bz2 = in_array( 'compress.bzip2', stream_get_wrappers() ) ? 'ok' : '(disabled; requires PHP bzip2 module)';
$this->mDescription = <<<TEXT
This script reads pages from an XML file as produced from Special:Export or
@@ -73,7 +73,7 @@ TEXT;
}
public function execute() {
- if( wfReadOnly() ) {
+ if ( wfReadOnly() ) {
$this->error( "Wiki is in read-only mode; you'll need to disable it for import to work.", true );
}
@@ -91,7 +91,7 @@ TEXT;
$this->setNsfilter( explode( '|', $this->getOption( 'namespaces' ) ) );
}
- if( $this->hasArg() ) {
+ if ( $this->hasArg() ) {
$this->importFromFile( $this->getArg() );
} else {
$this->importFromStdin();
@@ -247,7 +247,7 @@ TEXT;
function importFromStdin() {
$file = fopen( 'php://stdin', 'rt' );
- if( self::posix_isatty( $file ) ) {
+ if ( self::posix_isatty( $file ) ) {
$this->maybeHelp( true );
}
return $this->importFromHandle( $file );
@@ -259,14 +259,14 @@ TEXT;
$source = new ImportStreamSource( $handle );
$importer = new WikiImporter( $source );
- if( $this->hasOption( 'debug' ) ) {
+ if ( $this->hasOption( 'debug' ) ) {
$importer->setDebug( true );
}
if ( $this->hasOption( 'no-updates' ) ) {
$importer->setNoUpdates( true );
}
$importer->setPageCallback( array( &$this, 'reportPage' ) );
- $this->importCallback = $importer->setRevisionCallback(
+ $this->importCallback = $importer->setRevisionCallback(
array( &$this, 'handleRevision' ) );
$this->uploadCallback = $importer->setUploadCallback(
array( &$this, 'handleUpload' ) );
@@ -288,4 +288,4 @@ TEXT;
}
$maintClass = 'BackupReader';
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;