summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryAllCategories.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
commit72e90545454c0e014318fa3c81658e035aac58c1 (patch)
tree9212e3f46868989c4d57ae9a5c8a1a80e4dc0702 /includes/api/ApiQueryAllCategories.php
parent565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff)
applying patch to version 1.15.0
Diffstat (limited to 'includes/api/ApiQueryAllCategories.php')
-rw-r--r--includes/api/ApiQueryAllCategories.php20
1 files changed, 12 insertions, 8 deletions
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