MediaResultWidget: Remove unused code depending on VisualEditor
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 1 Apr 2019 15:55:17 +0000 (17:55 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 1 Apr 2019 15:55:17 +0000 (17:55 +0200)
It seems that this property is not actually used. The default thumb size
is also loaded in MediaResourceProvider by querying the meta=siteinfo API.

Bug: T219675
Change-Id: I42610a2ac1ba6b19f08ee9fc9a8fd4aa23e090a7

resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.js

index 0370654..e8ac592 100644 (file)
 
                this.calculateSizing( this.data );
 
-               // Get wiki default thumbnail size
-               // FIXME: Now this code is in core it definitely should not depend
-               // on a VE config variable.
-               this.defaultThumbSize = mw.config.get( 'wgVisualEditorConfig' )
-                       .thumbLimits[ mw.user.options.get( 'thumbsize' ) ];
-
                // Initialization
                this.setLabel( new mw.Title( this.data.title ).getNameText() );
                this.$label.addClass( 'mw-widget-mediaResultWidget-nameLabel' );