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/ApiQueryAllimages.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'includes/api/ApiQueryAllimages.php') diff --git a/includes/api/ApiQueryAllimages.php b/includes/api/ApiQueryAllimages.php index ea83c667..76d5d238 100644 --- a/includes/api/ApiQueryAllimages.php +++ b/includes/api/ApiQueryAllimages.php @@ -97,7 +97,7 @@ class ApiQueryAllimages extends ApiQueryGeneratorBase { $res = $this->select(__METHOD__); - $data = array (); + $titles = array(); $count = 0; $result = $this->getResult(); while ($row = $db->fetchObject($res)) { @@ -110,20 +110,23 @@ class ApiQueryAllimages extends ApiQueryGeneratorBase { if (is_null($resultPageSet)) { $file = $repo->newFileFromRow( $row ); - $data[] = array_merge(array('name' => $row->img_name), + $info = array_merge(array('name' => $row->img_name), ApiQueryImageInfo::getInfo($file, $prop, $result)); + $fit = $result->addValue(array('query', $this->getModuleName()), null, $info); + if( !$fit ) { + $this->setContinueEnumParameter('from', $this->keyToTitle($row->img_name)); + break; + } } else { - $data[] = Title::makeTitle(NS_FILE, $row->img_name); + $titles[] = Title::makeTitle(NS_IMAGE, $row->img_name); } } $db->freeResult($res); if (is_null($resultPageSet)) { - $result = $this->getResult(); - $result->setIndexedTagName($data, 'img'); - $result->addValue('query', $this->getModuleName(), $data); + $result->setIndexedTagName_internal(array('query', $this->getModuleName()), 'img'); } else { - $resultPageSet->populateFromTitles( $data ); + $resultPageSet->populateFromTitles($titles); } } @@ -202,6 +205,6 @@ class ApiQueryAllimages extends ApiQueryGeneratorBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiQueryAllimages.php 44121 2008-12-01 17:14:30Z vyznev $'; + return __CLASS__ . ': $Id: ApiQueryAllimages.php 46845 2009-02-05 14:30:59Z catrope $'; } } -- cgit v1.2.2