jenkins-bot has submitted this change and it was merged.
Change subject: Fix switching back from alpha to beta
......................................................................
Fix switching back from alpha to beta
Currently when a user opts out of alpha they get thrown
into stable. Expected: they should get thrown back to beta.
NEVER assemble HTML tags by concatenating strings.
Broken by I7a2e05edfdc8f438c3e7e8a43edc0eeb0122c34d
Change-Id: I00fe4a41eb8eb59ece093aaa822393a4e7d40c91
---
M includes/specials/SpecialMobileOptions.php
1 file changed, 8 insertions(+), 3 deletions(-)
Approvals:
Florianschmidtwelzow: Looks good to me, but someone else must approve
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialMobileOptions.php
b/includes/specials/SpecialMobileOptions.php
index 4e0c4df..7f17893 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -126,7 +126,7 @@
// alpha settings
if ( $betaEnabled ) {
if ( $alphaEnabled ) {
- $options['beta']['checked'] = 'checked';
+ $options['beta']['value'] = '1';
$options['beta']['type'] = 'hidden';
}
$options['alpha'] = array(
@@ -147,8 +147,13 @@
HTML;
foreach( $options as $key => $data ) {
if ( isset( $data['type'] ) && $data['type'] ===
'hidden' ) {
- $html .= '<input type="hidden" name="' .
$data['name'] . '" id="' . $data['id'] . '"
- ' . $data['checked'] . '>';
+ $html .= Html::element( 'input',
+ array(
+ 'type' => 'hidden',
+ 'name' => $data['name'],
+ 'value' => $data['checked'],
+ )
+ );
} else {
$html .= '
<div class="mobileoption">
--
To view, visit https://gerrit.wikimedia.org/r/166920
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I00fe4a41eb8eb59ece093aaa822393a4e7d40c91
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Awjrichards <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits