User "Aaron Schulz" posted a comment on MediaWiki.r100535.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100535#c25047
Commit summary:

Added a basic thumb-handler.php file, configured via thumb.config.php. The code 
is based on the wmf thumb handler, but simplified. It is disabled by default.
* The thumb.php parameter extraction can also be overridden by the config to 
handle more complex setups and things like OggHandler and PagedTiffHandler.
* A simple 404 error page is also included. It can be overridden by the config.
* Additional HTTP headers can be passed through cURL via the config.

Comment:

Of course neither can be used by default as a few lines of server config is 
needed. In any case, I'd prefer that we push thumbnail handling more than we 
currently do.

It's better to use 'transformVia404' to avoid a server having to make 
thumbnails while already saddled with parsing a page. In functions like 
prepareTextForEdit() or things that parse just to do links updates it's even 
more wasteful.

Using a 404 handler also makes thumbnails more robust, such as when a thumbnail 
wasn't made on parse for some reason due to intermittent failure.

Also, we should move towards standardizing thumb names more, as things like 
TiffHandler and OggHandler tack on their own little bits onto the thumb name to 
specify parameters. We can do the [thumb name] -> [thumb.php parameter] 
handling in PHP to deal with this (given a way to register extensions in the 
thumbnail config). It also means that site admins don't have to keep messing 
with server config to make things work.  

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

Reply via email to