From: Brad Jorsch Date: Wed, 3 Apr 2013 16:03:44 +0000 (-0400) Subject: Honor transform limit for images with many old revisions X-Git-Tag: 1.31.0-rc.0~20048^2 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=4f82e77122285ac9b097469da84b0254f564d396;p=lhc%2Fweb%2Fwiklou.git 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 --- 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',