jenkins-bot has submitted this change and it was merged.
Change subject: RSS feeds should not be in head for mobile
......................................................................
RSS feeds should not be in head for mobile
Bug: T100377
Change-Id: Idfa6e92fe2bc39ca4dd12f1c1ece572d93136e4d
---
M includes/MobileFrontend.hooks.php
M includes/config/Site.php
2 files changed, 12 insertions(+), 1 deletion(-)
Approvals:
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/MobileFrontend.hooks.php
b/includes/MobileFrontend.hooks.php
index 9d482bd..dfd1a00 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -688,7 +688,7 @@
* @return bool
*/
public static function onBeforePageDisplay( &$out, &$sk ) {
- global $wgWPBSkinBlacklist, $wgWPBEnableDefaultBanner;
+ global $wgFeed, $wgWPBSkinBlacklist, $wgWPBEnableDefaultBanner;
$context = MobileContext::singleton();
$config = $context->getMFConfig();
$mfEnableXAnalyticsLogging = $config->get(
'MFEnableXAnalyticsLogging' );
@@ -773,6 +773,11 @@
// in mobile view: always add vary header
$out->addVaryHeader( 'Cookie' );
+ // T100377: By default hide RSS <link>s
+ // FIXME: Overwriting the config variable doesn't seem
to be the best solution,
+ // it should be able to omit the feed links by a hook
or something else - bug T121774
+ $wgFeed = $config->get( 'MFRSSFeedLink' );
+
// Allow modifications in mobile only mode
Hooks::run( 'BeforePageDisplayMobile', array( &$out,
&$sk ) );
}
diff --git a/includes/config/Site.php b/includes/config/Site.php
index 78a5479..85a225f 100644
--- a/includes/config/Site.php
+++ b/includes/config/Site.php
@@ -143,3 +143,9 @@
* @var int|string
*/
$wgMFContentNamespace = NS_MAIN;
+
+/**
+ * Sets RSS feed <link> being outputted or not.
+ * @var bool
+ */
+$wgMFRSSFeedLink = false;
--
To view, visit https://gerrit.wikimedia.org/r/259546
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idfa6e92fe2bc39ca4dd12f1c1ece572d93136e4d
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Albert221 <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[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