jenkins-bot has submitted this change and it was merged.

Change subject: Honor transform limit for images with many old revisions
......................................................................


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
---
M includes/api/ApiQueryImageInfo.php
1 file changed, 6 insertions(+), 3 deletions(-)

Approvals:
  Tim Starling: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiQueryImageInfo.php 
b/includes/api/ApiQueryImageInfo.php
index b2ef048..87bdbfe 100644
--- a/includes/api/ApiQueryImageInfo.php
+++ b/includes/api/ApiQueryImageInfo.php
@@ -170,9 +170,12 @@
                                                }
                                                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',

-- 
To view, visit https://gerrit.wikimedia.org/r/57311
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e8aecc76a1190bac353a2b9855bc6a19ec06dec
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: Yurik <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to