r113146 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113145‎ | r113146 | r113147 >
Date:16:06, 6 March 2012
Author:jdlrobson
Status:ok
Tags:
Comment:
fix for bug 34829

this removes the mobileaction parameter from the link
to view this on the mobile site to avoid the conflict of
mobileaction and useformat querystring parameters
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.body.php
@@ -198,7 +198,9 @@
199199
200200 if ( ! $isSpecial ) {
201201 $footerlinks = $tpl->data['footerlinks'];
202 - $mobileViewUrl = $wgRequest->escapeAppendQuery( 'useformat=mobile' );
 202+ $mobileViewUrl = htmlspecialchars(
 203+ $this->removeQueryStringParameter( $wgRequest->appendQuery( 'useformat=mobile' ), 'mobileaction' )
 204+ );
203205
204206 $tpl->set( 'mobileview', "<a href='{$mobileViewUrl}' class='noprint'>" . wfMsg( 'mobile-frontend-view' ) . "</a>" );
205207 $footerlinks['places'][] = 'mobileview';

Status & tagging log