r68409 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68408‎ | r68409 | r68410 >
Date:16:01, 22 June 2010
Author:daniel
Status:ok (Comments)
Tags:
Comment:
passing thumbnail params to getThumbType, as suggested by TimStarling in a comment to bug 23258
Modified paths:
  • /trunk/phase3/includes/filerepo/File.php (modified) (history)
  • /trunk/phase3/includes/media/Generic.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/File.php
@@ -460,7 +460,7 @@
461461 return null;
462462 }
463463 $extension = $this->getExtension();
464 - list( $thumbExt, $thumbMime ) = $this->handler->getThumbType( $extension, $this->getMimeType() );
 464+ list( $thumbExt, $thumbMime ) = $this->handler->getThumbType( $extension, $this->getMimeType(), $params );
465465 $thumbName = $this->handler->makeParamString( $params ) . '-' . $this->getName();
466466 if ( $thumbExt != $extension ) {
467467 $thumbName .= ".$thumbExt";
Index: trunk/phase3/includes/media/Generic.php
@@ -139,7 +139,7 @@
140140 * Get the thumbnail extension and MIME type for a given source MIME type
141141 * @return array thumbnail extension and MIME type
142142 */
143 - function getThumbType( $ext, $mime ) {
 143+ function getThumbType( $ext, $mime, $params = null ) {
144144 return array( $ext, $mime );
145145 }
146146

Follow-up revisions

RevisionCommit summaryAuthorDate
r68418fixed thumbnail parameter handling, as suggested by TimStarling in a comment ...daniel17:40, 22 June 2010
r68468Follow-up r68409: shut up PHP Strict Standards notices about "Declaration of ...siebrand18:18, 23 June 2010
r68469Follow-up r68409 for extensions: shut up PHP Strict Standards notices about "...siebrand18:23, 23 June 2010
r68661improved meta-data and error handling and persistance, as suggested by tim in...daniel14:41, 28 June 2010
r68664use internal Exif per default, as suggested by tim in a comment to bug 23258;...daniel16:15, 28 June 2010
r71188MFT r68409, r68468, r68469, r68714: supporting revisions for PagedTiffHandler.tstarling02:19, 17 August 2010

Comments

#Comment by Raymond (talk | contribs)   19:00, 22 June 2010

PHP Strict Standards: Declaration of SvgHandler::getThumbType() should be compatible with that of MediaHandler::getThumbType() in /www/w/includes/AutoLoader.php on line 690

#Comment by Raymond (talk | contribs)   19:19, 22 June 2010

And:

PHP Strict Standards: Declaration of PagedTiffHandler::getThumbType() should be compatible with that of MediaHandler::getThumbType() in /www/w/extensions/PagedTiffHandler/PagedTiffHandler_body.php on line 23

Even though fixed in core and TiffHandler it will spew errors for all extensions that extends the ImageHandler class.

#Comment by Raymond (talk | contribs)   19:19, 22 June 2010

And:

PHP Strict Standards: Declaration of PagedTiffHandler::getThumbType() should be compatible with that of MediaHandler::getThumbType() in /www/w/extensions/PagedTiffHandler/PagedTiffHandler_body.php on line 23

Even though fixed in core and TiffHandler it will spew errors for all extensions that extends the ImageHandler class.

#Comment by Duesentrieb (talk | contribs)   21:19, 22 June 2010

ok. we need that extra parameter there. what would be the right way to add it, then? i suppose i could add it for all omplementations of MediaHanlder that override getThumbType. in trunk. would that help?

#Comment by Siebrand (talk | contribs)   18:24, 23 June 2010

Done. Setting commit state to new.

#Comment by Duesentrieb (talk | contribs)   18:40, 23 June 2010

thanks siebrand

#Comment by Duesentrieb (talk | contribs)   13:28, 15 July 2010

need this live, so we can deploy PagedTiffHandler

Status & tagging log