jenkins-bot has submitted this change and it was merged.

Change subject: Add the 'wgMFMode' config variable to the page only in mobile 
mode
......................................................................


Add the 'wgMFMode' config variable to the page only in mobile mode

The variable is still available on all skins that are used in displaying
the mobile site.

Available:
* ?mobileaction=toggle_view_mobile&useskin=minerva
* ?mobileaction=toggle_view_mobile&useskin=vector
* etc.

Not available:
* ?mobileaction=toggle_view_desktop&useskin=minerva
* ?mobileaction=toggle_view_desktop&useskin=vector
* etc.

Bug: T127910
Change-Id: Iff3807ccf95883adcc4ab1a0a2ee96739d58b146
---
M includes/MobileFrontend.hooks.php
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 5240b33..ff612c0 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1303,10 +1303,9 @@
                $context = MobileContext::singleton();
                if ( $context->shouldDisplayMobileView() ){
                        unset( $vars['wgCategories'] );
+                       $vars['wgMFMode'] = $context->isBetaGroupMember() ? 
'beta' : 'stable';
                }
                $title = $out->getTitle();
-
-               $vars['wgMFMode'] = $context->isBetaGroupMember() ? 'beta' : 
'stable';
                $vars['wgPreferredVariant'] = 
$title->getPageLanguage()->getPreferredVariant();
                return true;
        }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff3807ccf95883adcc4ab1a0a2ee96739d58b146
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <[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

Reply via email to