From 72e90545454c0e014318fa3c81658e035aac58c1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 10 Jun 2009 13:00:47 +0200 Subject: applying patch to version 1.15.0 --- includes/api/ApiQueryAllCategories.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'includes/api/ApiQueryAllCategories.php') diff --git a/includes/api/ApiQueryAllCategories.php b/includes/api/ApiQueryAllCategories.php index e6287eea..e835c042 100644 --- a/includes/api/ApiQueryAllCategories.php +++ b/includes/api/ApiQueryAllCategories.php @@ -103,21 +103,25 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase { $item = array(); $result->setContent( $item, $titleObj->getText() ); if( isset( $prop['size'] ) ) { - $item['size'] = $row->cat_pages; + $item['size'] = intval($row->cat_pages); $item['pages'] = $row->cat_pages - $row->cat_subcats - $row->cat_files; - $item['files'] = $row->cat_files; - $item['subcats'] = $row->cat_subcats; + $item['files'] = intval($row->cat_files); + $item['subcats'] = intval($row->cat_subcats); } if( isset( $prop['hidden'] ) && $row->cat_hidden ) $item['hidden'] = ''; - $categories[] = $item; + $fit = $result->addValue(array('query', $this->getModuleName()), null, $item); + if(!$fit) + { + $this->setContinueEnumParameter('from', $this->keyToTitle($row->cat_title)); + break; + } } } $db->freeResult($res); if (is_null($resultPageSet)) { - $result->setIndexedTagName($categories, 'c'); - $result->addValue('query', $this->getModuleName(), $categories); + $result->setIndexedTagName_internal(array('query', $this->getModuleName()), 'c'); } else { $resultPageSet->populateFromTitles($pages); } @@ -171,6 +175,6 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiQueryAllCategories.php 44590 2008-12-14 20:24:23Z catrope $'; + return __CLASS__ . ': $Id: ApiQueryAllCategories.php 47865 2009-02-27 16:03:01Z catrope $'; } -} +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf