diff options
Diffstat (limited to 'includes/api/ApiQueryBlocks.php')
-rw-r--r-- | includes/api/ApiQueryBlocks.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index 6f356cea..c5ffc37b 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -115,7 +115,7 @@ class ApiQueryBlocks extends ApiQueryBase { "ipb_range_end >= '$upper'" )); } - if(!$wgUser->isAllowed('suppress')) + if(!$wgUser->isAllowed('hideuser')) $this->addWhereFld('ipb_deleted', 0); // Purge expired entries on one in every 10 queries @@ -169,10 +169,14 @@ class ApiQueryBlocks extends ApiQueryBase { if($row->ipb_allow_usertalk) $block['allowusertalk'] = ''; } - $data[] = $block; + $fit = $result->addValue(array('query', $this->getModuleName()), null, $block); + if(!$fit) + { + $this->setContinueEnumParameter('start', wfTimestamp(TS_ISO_8601, $row->ipb_timestamp)); + break; + } } - $result->setIndexedTagName($data, 'block'); - $result->addValue('query', $this->getModuleName(), $data); + $result->setIndexedTagName_internal(array('query', $this->getModuleName()), 'block'); } protected function prepareUsername($user) @@ -259,6 +263,6 @@ class ApiQueryBlocks extends ApiQueryBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiQueryBlocks.php 43676 2008-11-18 15:11:11Z catrope $'; + return __CLASS__ . ': $Id: ApiQueryBlocks.php 48213 2009-03-09 10:01:00Z aaron $'; } -} +}
\ No newline at end of file |