User "Tim Starling" changed the status of MediaWiki.r99912. Old Status: new New Status: fixme
User "Tim Starling" also posted a comment on MediaWiki.r99912. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99912#c24741 Commit summary: Per bug 28135: * Set JPEG comment * Add comment about the options array * Automatically set $wgEnableAutoRotation to true Comment: <pre> +# This scaler support rotation +$wgEnableAutoRotation = true; </pre> It's not appropriate to set core configuration globals in an extension setup file like this. If the user puts $wgEnableAutoRotation = false; in their LocalSettings.php before VipsScaler is registered, it means they really don't want auto-rotation, regardless of whether it is supported. You could add a hook to BitmapHandler::canRotate(), but the problem is that BitmapHandler::canRotate() doesn't specify any particular image, but VipsScaler whether will act on the BitmapHandlerTransform hook depends on what image is being scaled. My advice is to remove that line of code for now, and to consider a better architecture for MediaWiki 1.19. Perhaps $wgEnableAutoRotation could be true by default, instead of null. Then BitmapHandler::getRotation() would return zero if the handler cannot rotate the given file, instead of just screwing up everything like it does now if $wgEnableAutoRotation is true incorrectly. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
