Robmoen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/172885
Change subject: Disable CentralNotice on beta
......................................................................
Disable CentralNotice on beta
Feature flag wgMFDisableCentralNoticeInBeta on by default
Change-Id: I3296813c979311b82d5c1c79e8ed4e258e93b98f
---
M MobileFrontend.php
M includes/MobileFrontend.hooks.php
M includes/Resources.php
A less/centralNotice.less
4 files changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/85/172885/1
diff --git a/MobileFrontend.php b/MobileFrontend.php
index fc01c44..0ba4f95 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -559,3 +559,8 @@
// Just don't
NS_MEDIA,
);
+
+/**
+ * Disable CentralNotice in beta
+ */
+$wgMFDisableCentralNoticeInBeta = true;
diff --git a/includes/MobileFrontend.hooks.php
b/includes/MobileFrontend.hooks.php
index 19048cd..c86668b 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -611,7 +611,8 @@
* @return bool
*/
public static function onBeforePageDisplay( &$out, &$sk ) {
- global $wgMFEnableXAnalyticsLogging, $wgMFAppPackageId,
$wgMFAppScheme;
+ global $wgMFEnableXAnalyticsLogging, $wgMFAppPackageId,
$wgMFAppScheme,
+ $wgMFDisableCentralNoticeInBeta;
wfProfileIn( __METHOD__ );
$context = MobileContext::singleton();
@@ -654,6 +655,11 @@
}
}
+ // Disable CentralNotice in beta if necessary
+ if ( $context->isBetaGroupMember() &&
$wgMFDisableCentralNoticeInBeta ) {
+ $out->addModuleStyles(
'skins.minerva.centralNotice.styles' );
+ }
+
$out->addVaryHeader( 'Cookie' );
wfProfileOut( __METHOD__ );
diff --git a/includes/Resources.php b/includes/Resources.php
index c087987..861a0a3 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -77,6 +77,11 @@
'less/iconsNew.less',
),
),
+ 'skins.minerva.centralNotice.styles' =>
$wgMFResourceFileModuleBoilerplate + array(
+ 'styles' => array(
+ 'less/centralNotice.less',
+ ),
+ ),
);
$wgResourceModules = array_merge( $wgResourceModules, array(
diff --git a/less/centralNotice.less b/less/centralNotice.less
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/less/centralNotice.less
--
To view, visit https://gerrit.wikimedia.org/r/172885
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3296813c979311b82d5c1c79e8ed4e258e93b98f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits