r100136 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100135‎ | r100136 | r100137 >
Date:17:56, 18 October 2011
Author:preilly
Status:ok (Comments)
Tags:
Comment:
fix for bug 31329 - bad view this page on regular wikipedia link
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -306,7 +306,7 @@
307307 self::$disableMobileSiteURL = $wgRequest->escapeAppendQuery( 'mobileaction=disable_mobile_site' );
308308 $parsedUrl = wfParseUrl( $wgRequest->getFullRequestURL() );
309309 $parsedUrl['host'] = str_replace( $wgMobileDomain, '.', $parsedUrl['host'] );
310 - $parsedUrl['query'] = $this->removeQueryStringParameter( '?' . $parsedUrl['query'], 'useformat' );
 310+ $parsedUrl['query'] = $this->removeQueryStringParameter( '?mobileaction=view_normal_site&' . $parsedUrl['query'], 'useformat' );
311311 $fragmentDelimiter = ( !empty( $parsedUrl['fragment'] ) ) ? '#' : '';
312312 self::$viewNormalSiteURL = $parsedUrl['scheme'] . '://' . $parsedUrl['host'] . $parsedUrl['path'] . $parsedUrl['query'] . $fragmentDelimiter . $parsedUrl['fragment'];
313313 self::$currentURL = $wgRequest->getFullRequestURL();
@@ -546,7 +546,8 @@
547547 if ( self::$useFormat === 'mobile' ||
548548 self::$useFormat === 'mobile-wap' ||
549549 !empty( $xDevice ) ) {
550 - if ( $action !== 'edit' ) {
 550+ if ( $action !== 'edit' &&
 551+ $mobileAction !== 'view_normal_site' ) {
551552 $this->getMsg();
552553 $this->disableCaching();
553554 $this->sendXDeviceVaryHeader();

Follow-up revisions

RevisionCommit summaryAuthorDate
r100137mft r100136preilly17:56, 18 October 2011
r100141fix for bug 31329 - bad view this page on regular wikipedia linkpreilly18:23, 18 October 2011

Comments

#Comment by G.Hagedorn (talk | contribs)   10:55, 19 October 2011

applied to 1.18wmf1, please consider tagging 1.18, unless reverted in follow-up

Status & tagging log