jenkins-bot has submitted this change and it was merged.
Change subject: Ensure title arg isn't set twice when creating 'mobile view'
link
......................................................................
Ensure title arg isn't set twice when creating 'mobile view' link
This was happening previously - but only in cases where the
wgMobileUrlTemplate variable was NOT set (e.g., not on Wikimedia wikis).
Now it happens all the time.
Bug: 56837
Change-Id: Ibdbbf461f95d48f9c522f08027ced510a05f0bff
---
M includes/MobileFrontend.hooks.php
1 file changed, 4 insertions(+), 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 1e7d3af..156fd63 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -119,15 +119,17 @@
if ( ! $isSpecial ) {
$footerlinks = $tpl->data['footerlinks'];
$args = $tpl->getSkin()->getRequest()->getValues();
+ // avoid title being set twice
+ unset( $args['title'] );
+
/**
* Adds query string to force mobile view if we're not
using $wgMobileUrlTemplate
* This is to preserve pretty/canonical links for a
happy cache where possible (eg WMF cluster)
*/
if ( !strlen( $wgMobileUrlTemplate ) ) {
- // avoid title being set twice
- unset( $args['title'] );
$args['mobileaction'] = 'toggle_view_mobile';
}
+
$mobileViewUrl = $title->getFullURL( $args );
$mobileViewUrl =
MobileContext::singleton()->getMobileUrl( $mobileViewUrl );
--
To view, visit https://gerrit.wikimedia.org/r/99270
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibdbbf461f95d48f9c522f08027ced510a05f0bff
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Awjrichards <[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