Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/196623
Change subject: Html: Make addition of 'mw-ui-input' conditional on
$wgUseMediaWikiUIEverywhere
......................................................................
Html: Make addition of 'mw-ui-input' conditional on $wgUseMediaWikiUIEverywhere
We were always adding it previously, which seemed harmless since
'mediawiki.ui.input' RL module, providing the styling, was only loaded
if $wgUseMediaWikiUIEverywhere was true... unless someone loaded it
manually to have specific input fields styled. Whoops.
There are a lot more unconditional additions like this in tons of
places in the code, and someone should check whether each one is
intentional or not, but probably no one will. Oh well.
Bug: T92496
Change-Id: I5e91a3852a76ebbbfe64485bccb4c30ddee28b66
---
M includes/Html.php
1 file changed, 10 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/23/196623/1
diff --git a/includes/Html.php b/includes/Html.php
index bc5cde8..8799225 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -141,16 +141,17 @@
if ( !$attrs ) {
$attrs = array();
}
- if ( isset( $attrs['class'] ) ) {
- if ( is_array( $attrs['class'] ) ) {
- $attrs['class'][] = 'mw-ui-input';
- } else {
- $attrs['class'] .= ' mw-ui-input';
- }
- } else {
- $attrs['class'] = 'mw-ui-input';
- }
if ( $wgUseMediaWikiUIEverywhere ) {
+ if ( isset( $attrs['class'] ) ) {
+ if ( is_array( $attrs['class'] ) ) {
+ $attrs['class'][] = 'mw-ui-input';
+ } else {
+ $attrs['class'] .= ' mw-ui-input';
+ }
+ } else {
+ $attrs['class'] = 'mw-ui-input';
+ }
+
// Note that size can effect the desired width
rendering of mw-ui-input elements
// so it is removed. Left intact when mediawiki ui not
enabled.
unset( $attrs['size'] );
--
To view, visit https://gerrit.wikimedia.org/r/196623
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e91a3852a76ebbbfe64485bccb4c30ddee28b66
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits