Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/209192

Change subject: Don't disable images whilst opting into beta
......................................................................

Don't disable images whilst opting into beta

Far too mean to be trolling like this.
Bug: T98187

Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
---
M includes/specials/SpecialMobileOptions.php
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/92/209192/1

diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 183c03a..f382761 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -269,11 +269,13 @@
                }
                $context->setMobileMode( $group );
                $imagesDisabled = !$request->getBool( 'enableImages' );
-               if ( $context->imagesDisabled() !== $imagesDisabled ) {
-                       // Only record when the state has changed
-                       $schemaData['images'] = $imagesDisabled ? "off" : "on";
+               if ( $request->getVal( 'enableImages' ) !== null ) {
+                       if ( $context->imagesDisabled() !== $imagesDisabled ) {
+                               // Only record when the state has changed
+                               $schemaData['images'] = $imagesDisabled ? "off" 
: "on";
+                       }
+                       $context->setDisableImagesCookie( $imagesDisabled );
                }
-               $context->setDisableImagesCookie( $imagesDisabled );
 
                $returnToTitle = Title::newFromText( $request->getText( 
'returnto' ) );
                if ( $returnToTitle ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/209192
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifef83b8fa369f19f9a9d6eb4ab2164271104f8ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to