From dcaff40b74840b55413cfb13b96d25f191cbda24 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Thu, 13 Oct 2022 09:20:20 +0200 Subject: refactor: clarify what a code comment refers to --- Vote.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Vote.php') diff --git a/Vote.php b/Vote.php index ffedcba..f1fd043 100644 --- a/Vote.php +++ b/Vote.php @@ -235,8 +235,12 @@ class VoteHooks { ->addHeaderHtml('

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

') ->addFooterHtml(''); + $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; } } -- cgit v1.2.3