From 5e5179e8576316da9f9a9f9242c6a1ad25d8ef97 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Thu, 2 Aug 2018 18:01:11 -0700 Subject: [PATCH] Do not generate negative page counts in dump Due to T201119, some counts are not in sync. We are assuming that in this case page count is just 0. Change-Id: Iffd24270db6d852839d6922aa492c1975bf185e0 --- includes/CategoriesRdf.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/CategoriesRdf.php b/includes/CategoriesRdf.php index fc296d4c32..eb601a20ae 100644 --- a/includes/CategoriesRdf.php +++ b/includes/CategoriesRdf.php @@ -85,6 +85,10 @@ class CategoriesRdf { * @param int $subcategories Subcategory count */ public function writeCategoryData( $categoryName, $isHidden, $pages, $subcategories ) { + if ( $pages < 0 ) { + // Bugfix for T201119 + $pages = 0; + } $title = Title::makeTitle( NS_CATEGORY, $categoryName ); $this->rdfWriter->about( $this->titleToUrl( $title ) ) ->say( 'a' ) -- 2.20.1