From: Stanislav Malyshev Date: Fri, 3 Aug 2018 01:01:11 +0000 (-0700) Subject: Do not generate negative page counts in dump X-Git-Tag: 1.34.0-rc.0~4535^2 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=5e5179e8576316da9f9a9f9242c6a1ad25d8ef97;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' )