X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportDump.php;h=f0e0555af1deca3e2103865e69014db65186ae77;hb=bdfe02223205923d923923dd420ba0dd863cd0fe;hp=5806ffc936ba635c790e2d22dd648e102182ae8e;hpb=a7f35b785943ecf471095e79bc907aa5bbe228ca;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 ); }