dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove 3 unused allpages messages
[lhc/web/wiklou.git]
/
maintenance
/
importDump.php
diff --git
a/maintenance/importDump.php
b/maintenance/importDump.php
index
f51d7ad
..
1f47cf1
100644
(file)
--- a/
maintenance/importDump.php
+++ b/
maintenance/importDump.php
@@
-24,7
+24,7
@@
* @ingroup Maintenance
*/
* @ingroup Maintenance
*/
-require_once
( __DIR__ . '/Maintenance.php' )
;
+require_once
__DIR__ . '/Maintenance.php'
;
/**
* Maintenance script that imports XML dump files into the current wiki.
/**
* Maintenance script that imports XML dump files into the current wiki.
@@
-32,18
+32,18
@@
require_once( __DIR__ . '/Maintenance.php' );
* @ingroup Maintenance
*/
class BackupReader extends Maintenance {
* @ingroup Maintenance
*/
class BackupReader extends Maintenance {
-
var
$reportingInterval = 100;
-
var
$pageCount = 0;
-
var $revCount
= 0;
-
var $dryRun
= false;
-
var $uploads
= false;
-
var
$imageBasePath = false;
-
var $nsFilter
= false;
+
public
$reportingInterval = 100;
+
public
$pageCount = 0;
+
public $revCount
= 0;
+
public $dryRun
= false;
+
public $uploads
= false;
+
public
$imageBasePath = false;
+
public $nsFilter
= false;
function __construct() {
parent::__construct();
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
$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() {
}
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 );
}
$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' ) ) );
}
$this->setNsfilter( explode( '|', $this->getOption( 'namespaces' ) ) );
}
- if( $this->hasArg() ) {
+ if
( $this->hasArg() ) {
$this->importFromFile( $this->getArg() );
} else {
$this->importFromStdin();
$this->importFromFile( $this->getArg() );
} else {
$this->importFromStdin();
@@
-247,7
+247,7
@@
TEXT;
function importFromStdin() {
$file = fopen( 'php://stdin', 'rt' );
function importFromStdin() {
$file = fopen( 'php://stdin', 'rt' );
- if( self::posix_isatty( $file ) ) {
+ if
( self::posix_isatty( $file ) ) {
$this->maybeHelp( true );
}
return $this->importFromHandle( $file );
$this->maybeHelp( true );
}
return $this->importFromHandle( $file );
@@
-259,14
+259,14
@@
TEXT;
$source = new ImportStreamSource( $handle );
$importer = new WikiImporter( $source );
$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' ) );
$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' ) );
array( &$this, 'handleRevision' ) );
$this->uploadCallback = $importer->setUploadCallback(
array( &$this, 'handleUpload' ) );
@@
-288,4
+288,4
@@
TEXT;
}
$maintClass = 'BackupReader';
}
$maintClass = 'BackupReader';
-require_once
( RUN_MAINTENANCE_IF_MAIN )
;
+require_once
RUN_MAINTENANCE_IF_MAIN
;