for exports, make sure we compare page titles as strings only
authorAriel T. Glenn <ariel@wikimedia.org>
Sat, 6 Apr 2019 09:24:30 +0000 (12:24 +0300)
committerAriel T. Glenn <ariel@wikimedia.org>
Sat, 6 Apr 2019 10:01:33 +0000 (13:01 +0300)
...and not as numbers!! Also added strict compare for the namespaces
field while we're in here.

Bug: T220257
Change-Id: If68b79334188c2f3be5d254bea3c1e27d52c4a9f

includes/export/WikiExporter.php

index 120632c..e02cd83 100644 (file)
@@ -469,8 +469,8 @@ class WikiExporter {
        protected function outputPageStreamBatch( $results, $lastRow ) {
                foreach ( $results as $row ) {
                        if ( $lastRow === null ||
-                               $lastRow->page_namespace != $row->page_namespace ||
-                               $lastRow->page_title != $row->page_title ) {
+                               $lastRow->page_namespace !== $row->page_namespace ||
+                               $lastRow->page_title !== $row->page_title ) {
                                if ( $lastRow !== null ) {
                                        $output = '';
                                        if ( $this->dumpUploads ) {