X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FimportDump.php;h=f0e0555af1deca3e2103865e69014db65186ae77;hb=1834ee3d8e2f6a8ef2067ee7925c4f561209b12f;hp=5806ffc936ba635c790e2d22dd648e102182ae8e;hpb=0e289eae349ce35d03af3e8fc10e9ad2e0119f26;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 5806ffc936..f0e0555af1 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -49,7 +49,8 @@ class BackupReader extends Maintenance { ? 'ok' : '(disabled; requires PHP bzip2 module)'; - $this->mDescription = <<addDescription( + << -TEXT; +TEXT + ); $this->stderr = fopen( "php://stderr", "wt" ); $this->addOption( 'report', 'Report position and speed after every n pages processed', false, true ); @@ -116,7 +118,7 @@ TEXT; return; } - $this->nsFilter = array_unique( array_map( array( $this, 'getNsIndex' ), $namespaces ) ); + $this->nsFilter = array_unique( array_map( [ $this, 'getNsIndex' ], $namespaces ) ); } private function getNsIndex( $namespace ) { @@ -203,7 +205,7 @@ TEXT; // call_user_func( $this->uploadCallback, $revision ); $dbw = $this->getDB( DB_MASTER ); - return $dbw->deadlockLoop( array( $revision, 'importUpload' ) ); + return $dbw->deadlockLoop( [ $revision, 'importUpload' ] ); } } @@ -295,13 +297,13 @@ TEXT; return false; } } - $importer->setPageCallback( array( &$this, 'reportPage' ) ); + $importer->setPageCallback( [ $this, 'reportPage' ] ); $this->importCallback = $importer->setRevisionCallback( - array( &$this, 'handleRevision' ) ); + [ $this, 'handleRevision' ] ); $this->uploadCallback = $importer->setUploadCallback( - array( &$this, 'handleUpload' ) ); + [ $this, 'handleUpload' ] ); $this->logItemCallback = $importer->setLogItemCallback( - array( &$this, 'handleLogItem' ) ); + [ $this, 'handleLogItem' ] ); if ( $this->uploads ) { $importer->setImportUploads( true ); }