From 63056af6b39e8c58f5faebaa46532e0d86b29ad7 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Thu, 13 Oct 2022 09:28:35 +0200 Subject: set wgUseMediaWikiUIEverywhere = true; for MobileFrontend --- Vote.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Vote.php') diff --git a/Vote.php b/Vote.php index f1fd043..4f74e15 100644 --- a/Vote.php +++ b/Vote.php @@ -235,6 +235,14 @@ class VoteHooks { ->addHeaderHtml('

' . wfMessage('vote-add-your-vote')->inLanguage($parser->getTargetLanguage()) . '

') ->addFooterHtml(''); + // The MobileFrontend extension requires the mw-ui-button CSS class for + // buttons to look good. Xml::submitButton however only adds that CSS + // class when the global variable $wgUseMediaWikiUIEverywhere is set to + // true ... and MobileFrontend for some reason doesn't set that variable, + // so we just set it here ... ¯\_(ツ)_/¯ + global $wgUseMediaWikiUIEverywhere; + $wgUseMediaWikiUIEverywhere = true; + $html = $form->getHTML(false); // dirty hack to work around https://phabricator.wikimedia.org/T319216 -- cgit v1.2.3