User: System block reasons shouldn't expand templates
[lhc/web/wiklou.git] / resources / src / mediawiki.special / mediawiki.special.upload.js
index de5ab87..144659a 100644 (file)
 
                                if ( meta && meta.tiff && meta.tiff.Orientation ) {
                                        rotation = ( 360 - ( function () {
-                                               // See includes/media/Bitmap.php
+                                               // See BitmapHandler class in PHP
                                                switch ( meta.tiff.Orientation.value ) {
                                                        case 8:
                                                                return 90;
                                };
                                img.src = dataURL;
                        }, mw.config.get( 'wgFileCanRotate' ) ? function ( data ) {
+                               var jpegmeta = mw.loader.require( 'mediawiki.libs.jpegmeta' );
                                try {
-                                       meta = mw.libs.jpegmeta( data, file.fileName );
+                                       meta = jpegmeta( data, file.fileName );
                                        // eslint-disable-next-line no-underscore-dangle, camelcase
                                        meta._binary_data = null;
                                } catch ( e ) {