Merge "Do not normalise external links to special pages"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 8 Oct 2016 23:22:57 +0000 (23:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 8 Oct 2016 23:22:57 +0000 (23:22 +0000)
resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
tests/phpunit/MediaWikiTestCase.php

index 91f797d..a3088ec 100644 (file)
                        calendar: {}
                }, config );
 
+               // See InputWidget#reusePreInfuseDOM about config.$input
+               if ( config.$input ) {
+                       config.$input.addClass( 'oo-ui-element-hidden' );
+               }
+
                if ( $.isPlainObject( config.formatter ) && config.formatter.format === undefined ) {
                        config.formatter.format = '@' + config.type;
                }
                        } );
                }
 
-               // Our form input *should* be type="hidden". But if we're infusing from
-               // PHP, it's not.
-               if ( this.$input.attr( 'type' ) !== 'hidden' ) {
-                       try {
-                               this.$input.attr( 'type', 'hidden' );
-                       } catch ( e ) {
-                       }
-                       // IE <= 8, and IE 9 in quirks mode, doesn't allow changing the
-                       // type, so just hide the field with CSS. IE 9 in quirks mode
-                       // doesn't even throw an error, so do that unconditionally. Sigh.
-                       this.$input.css( 'display', 'none' );
-               }
-
                // Initialization
                this.setTabIndex( -1 );
 
index e53a958..9599016 100644 (file)
@@ -242,7 +242,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                 * which we can't allow, as that would open a new connection for mysql.
                 * Replace with a HashBag. They would not be going to persist anyway.
                 */
-               $hashCache = [ 'class' => 'HashBagOStuff' ];
+               $hashCache = [ 'class' => 'HashBagOStuff', 'reportDupes' => false ];
                $objectCaches = [
                                CACHE_DB => $hashCache,
                                CACHE_ACCEL => $hashCache,