Merge "Title: Title::getSubpage should not lose the interwiki prefix"
[lhc/web/wiklou.git] / maintenance / includes / BackupDumper.php
index 0b450a6..df3b4a1 100644 (file)
@@ -48,6 +48,7 @@ abstract class BackupDumper extends Maintenance {
        public $dumpUploads = false;
        public $dumpUploadFileContents = false;
        public $orderRevs = false;
+       public $limitNamespaces = [];
 
        protected $reportingInterval = 100;
        protected $pageCount = 0;
@@ -264,7 +265,7 @@ abstract class BackupDumper extends Maintenance {
                $this->initProgress( $history );
 
                $db = $this->backupDb();
-               $exporter = new WikiExporter( $db, $history, $text );
+               $exporter = new WikiExporter( $db, $history, $text, $this->limitNamespaces );
                $exporter->setSchemaVersion( $this->schemaVersion );
                $exporter->dumpUploads = $this->dumpUploads;
                $exporter->dumpUploadFileContents = $this->dumpUploadFileContents;
@@ -411,10 +412,12 @@ abstract class BackupDumper extends Maintenance {
                                $pageRatePart = '-';
                                $revRatePart = '-';
                        }
+
+                       $dbDomain = WikiMap::getCurrentWikiDbDomain()->getId();
                        $this->progress( sprintf(
                                "%s: %s (ID %d) %d pages (%0.1f|%0.1f/sec all|curr), "
                                        . "%d revs (%0.1f|%0.1f/sec all|curr), ETA %s [max %d]",
-                               $now, wfWikiID(), $this->ID, $this->pageCount, $pageRate,
+                               $now, $dbDomain, $this->ID, $this->pageCount, $pageRate,
                                $pageRatePart, $this->revCount, $revRate, $revRatePart, $etats,
                                $this->maxCount
                        ) );