summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryCategoryMembers.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/ApiQueryCategoryMembers.php
parent565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff)
applying patch to version 1.15.0
Diffstat (limited to 'includes/api/ApiQueryCategoryMembers.php')
-rw-r--r--includes/api/ApiQueryCategoryMembers.php25
1 files changed, 16 insertions, 9 deletions
diff --git a/includes/api/ApiQueryCategoryMembers.php b/includes/api/ApiQueryCategoryMembers.php
index e2f577a2..dc5a8265 100644
--- a/includes/api/ApiQueryCategoryMembers.php
+++ b/includes/api/ApiQueryCategoryMembers.php
@@ -112,31 +112,38 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
break;
}
- $lastSortKey = $row->cl_sortkey; // detect duplicate sortkeys
-
if (is_null($resultPageSet)) {
$vals = array();
if ($fld_ids)
$vals['pageid'] = intval($row->page_id);
if ($fld_title) {
$title = Title :: makeTitle($row->page_namespace, $row->page_title);
- $vals['ns'] = intval($title->getNamespace());
- $vals['title'] = $title->getPrefixedText();
+ ApiQueryBase::addTitleInfo($vals, $title);
}
if ($fld_sortkey)
$vals['sortkey'] = $row->cl_sortkey;
if ($fld_timestamp)
$vals['timestamp'] = wfTimestamp(TS_ISO_8601, $row->cl_timestamp);
- $data[] = $vals;
+ $fit = $this->getResult()->addValue(array('query', $this->getModuleName()),
+ null, $vals);
+ if(!$fit)
+ {
+ if ($params['sort'] == 'timestamp')
+ $this->setContinueEnumParameter('start', wfTimestamp(TS_ISO_8601, $row->cl_timestamp));
+ else
+ $this->setContinueEnumParameter('continue', $this->getContinueStr($row, $lastSortKey));
+ break;
+ }
} else {
$resultPageSet->processDbRow($row);
}
+ $lastSortKey = $row->cl_sortkey; // detect duplicate sortkeys
}
$db->freeResult($res);
if (is_null($resultPageSet)) {
- $this->getResult()->setIndexedTagName($data, 'cm');
- $this->getResult()->addValue('query', $this->getModuleName(), $data);
+ $this->getResult()->setIndexedTagName_internal(
+ array('query', $this->getModuleName()), 'cm');
}
}
@@ -255,6 +262,6 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
}
public function getVersion() {
- return __CLASS__ . ': $Id: ApiQueryCategoryMembers.php 42197 2008-10-18 10:09:19Z ialex $';
+ return __CLASS__ . ': $Id: ApiQueryCategoryMembers.php 47865 2009-02-27 16:03:01Z catrope $';
}
-}
+} \ No newline at end of file