From 4f82e77122285ac9b097469da84b0254f564d396 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Wed, 3 Apr 2013 12:03:44 -0400 Subject: [PATCH] Honor transform limit for images with many old revisions When preparing Id0ec6a0a, for some reason I thought the thumbnailing only applied to the current revision. Fix that oversight. Change-Id: I2e8aecc76a1190bac353a2b9855bc6a19ec06dec --- includes/api/ApiQueryImageInfo.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index b2ef048ec7..87bdbfe3da 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -170,9 +170,12 @@ class ApiQueryImageInfo extends ApiQueryBase { } break; } - $fit = $this->addPageSubItem( $pageId, - self::getInfo( $oldie, $prop, $result, - $finalThumbParams, $params['metadataversion'] ) ); + $fit = self::getTransformCount() < self::TRANSFORM_LIMIT && + $this->addPageSubItem( $pageId, + self::getInfo( $oldie, $prop, $result, + $finalThumbParams, $params['metadataversion'] + ) + ); if ( !$fit ) { if ( count( $pageIds[NS_FILE] ) == 1 ) { $this->setContinueEnumParameter( 'start', -- 2.20.1