summaryrefslogtreecommitdiff
path: root/Vote.php
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2022-10-13 09:28:35 +0200
committerMartin Fischer <martin@push-f.com>2022-10-13 09:28:35 +0200
commit63056af6b39e8c58f5faebaa46532e0d86b29ad7 (patch)
tree72d208d51d2c17a84cc10515dcdbf6e9bc00fc1f /Vote.php
parentdcaff40b74840b55413cfb13b96d25f191cbda24 (diff)
set wgUseMediaWikiUIEverywhere = true; for MobileFrontend
Diffstat (limited to 'Vote.php')
-rw-r--r--Vote.php8
1 files changed, 8 insertions, 0 deletions
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('<h3>' . wfMessage('vote-add-your-vote')->inLanguage($parser->getTargetLanguage()) . '</h3>')
->addFooterHtml('<script type="application/json" data-votes>'. json_encode($votes) . '</script>');
+ // 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