Update suppressWarning()/restoreWarning() calls
[lhc/web/wiklou.git] / maintenance / dumpTextPass.php
index 0604f48..57e09a7 100644 (file)
@@ -143,8 +143,6 @@ TEXT
        }
 
        function processOptions() {
-               global $IP;
-
                parent::processOptions();
 
                if ( $this->hasOption( 'buffersize' ) ) {
@@ -152,7 +150,6 @@ TEXT
                }
 
                if ( $this->hasOption( 'prefetch' ) ) {
-                       require_once "$IP/maintenance/backupPrefetch.inc";
                        $url = $this->processFileOpt( $this->getOption( 'prefetch' ) );
                        $this->prefetch = new BaseDump( $url );
                }
@@ -725,13 +722,13 @@ TEXT
        }
 
        private function getTextSpawned( $id ) {
-               MediaWiki\suppressWarnings();
+               Wikimedia\suppressWarnings();
                if ( !$this->spawnProc ) {
                        // First time?
                        $this->openSpawn();
                }
                $text = $this->getTextSpawnedOnce( $id );
-               MediaWiki\restoreWarnings();
+               Wikimedia\restoreWarnings();
 
                return $text;
        }
@@ -777,7 +774,7 @@ TEXT
        }
 
        private function closeSpawn() {
-               MediaWiki\suppressWarnings();
+               Wikimedia\suppressWarnings();
                if ( $this->spawnRead ) {
                        fclose( $this->spawnRead );
                }
@@ -794,7 +791,7 @@ TEXT
                        pclose( $this->spawnProc );
                }
                $this->spawnProc = false;
-               MediaWiki\restoreWarnings();
+               Wikimedia\restoreWarnings();
        }
 
        private function getTextSpawnedOnce( $id ) {
@@ -989,5 +986,5 @@ TEXT
        }
 }
 
-$maintClass = 'TextPassDumper';
+$maintClass = TextPassDumper::class;
 require_once RUN_MAINTENANCE_IF_MAIN;