diff options
author | Martin Fischer <martin@push-f.com> | 2022-10-13 09:20:20 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-10-13 09:21:50 +0200 |
commit | dcaff40b74840b55413cfb13b96d25f191cbda24 (patch) | |
tree | 0021e8e4050e7f0a83e68d3d8a9c03fe8a7c7d0b /Vote.php | |
parent | 56e25a05db769f4601d4125a5aff91e685e16543 (diff) |
refactor: clarify what a code comment refers to
Diffstat (limited to 'Vote.php')
-rw-r--r-- | Vote.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -235,8 +235,12 @@ class VoteHooks { ->addHeaderHtml('<h3>' . wfMessage('vote-add-your-vote')->inLanguage($parser->getTargetLanguage()) . '</h3>') ->addFooterHtml('<script type="application/json" data-votes>'. json_encode($votes) . '</script>'); + $html = $form->getHTML(false); + // dirty hack to work around https://phabricator.wikimedia.org/T319216 - return str_replace('type="radio"', 'type="radio" required', $form->getHTML(false)); + $html = str_replace('type="radio"', 'type="radio" required', $html); + + return $html; } } |