r68715 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68714‎ | r68715 | r68716 >
Date:08:41, 29 June 2010
Author:daniel
Status:ok
Tags:
Comment:
normalisation of parameter "page" was moved to ImageHandler as of r68714; this is a follow-up to r68418
Modified paths:
  • /trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php
@@ -194,23 +194,15 @@
195195
196196 /**
197197 * Prepares param array and sets standard values.
198 - * Standard values for page and lossy are added.
 198+ * Adds normalisation for parameter "lossy".
199199 */
200200 function normaliseParams( $image, &$params ) {
201 - $data = $this->getMetaArray( $image );
202 - if ( !$data ) {
 201+ if ( !parent::normaliseParams( $image, $params ) ) {
203202 return false;
204203 }
205204
206 - if ( isset( $params['page'] ) ) {
207 - $pages = $data['page_amount'];
208 -
209 - if ( $params['page'] > $pages ) {
210 - $params['page'] = intval( $pages );
211 - }
212 - }
213 -
214 - if ( !parent::normaliseParams( $image, $params ) ) {
 205+ $data = $this->getMetaArray( $image );
 206+ if ( !$data ) {
215207 return false;
216208 }
217209

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r68418fixed thumbnail parameter handling, as suggested by TimStarling in a comment ...daniel17:40, 22 June 2010
r68714added normalization for parameter 'page', based on pageCount, as by tims comm...daniel08:40, 29 June 2010

Status & tagging log