* New hook "Collation::factory" to allow extensions to create custom
category collations.
* $wgGroupPermissions now supports per namespace permissions.
+* $wgEnableAutoRotation enables or disables auto-rotation. Leaving it set to
+ null will cause MediaWiki to determine if auto-rotation is available.
=== New features in 1.18 ===
* BREAKING CHANGE: action=watch / action=unwatch now requires a token.
/** Obsolete, always true, kept for compatibility with extensions */
$wgUseImageResize = true;
+/**
+ * If set to true, images that contain certain the exif orientation tag will
+ * be rotated accordingly. If set to null, try to auto-detect whether a scaler
+ * is available that can rotate.
+ */
+$wgEnableAutoRotation = null;
/**
* Internal name of virus scanner. This servers as a key to the
);
}
+if ( is_null( $wgEnableAutoRotation ) ) {
+ // Only enable auto-rotation when the bitmap handler can rotate
+ $wgEnableAutoRotation = BitmapHandler::canRotate();
+}
+
if ( $wgRCFilterByAge ) {
# # Trim down $wgRCLinkDays so that it only lists links which are valid
# # as determined by $wgRCMaxAge.
* @return int 0, 90, 180 or 270
*/
public function getRotation( $file ) {
+ global $wgEnableAutoRotation;
+ if ( !$wgEnableAutoRotation ) {
+ return 0;
+ }
+
$data = $file->getMetadata();
return $this->getRotationForExif( $data );
}