X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FimportDump.php;h=1f47cf12c21b3f43863c583614f62ef37af7d4f3;hb=dc7326ad3e86b8fe659b60d9cfff8c157ab55975;hp=9553a1faeab5f2cfc59914bf459106ce1bd00486;hpb=15abcf71ca7ec185b475e47ef0fe43884e764239;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 9553a1faea..1f47cf12c2 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 = <<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,7 +259,7 @@ 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' ) ) { @@ -288,4 +288,4 @@ TEXT; } $maintClass = 'BackupReader'; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;