r98451 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98450‎ | r98451 | r98452 >
Date:21:08, 29 September 2011
Author:preilly
Status:ok (Comments)
Tags:todo 
Comment:
fix for unnecessary query delimiter on some links
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -84,7 +84,7 @@
8585 }
8686
8787 class ExtMobileFrontend {
88 - const VERSION = '0.5.73';
 88+ const VERSION = '0.5.74';
8989
9090 /**
9191 * @var DOMDocument
@@ -244,7 +244,8 @@
245245 $parsedUrl['host'] = str_replace( $wgMobileDomain, '.', $parsedUrl['host'] );
246246 $parsedUrl['query'] = $this->removeQueryStringParameter( $parsedUrl['query'], 'useformat' );
247247 $fragmentDelimiter = ( !empty( $parsedUrl['fragment'] ) ) ? '#' : '';
248 - self::$viewNormalSiteURL = $parsedUrl['scheme'] . '://' . $parsedUrl['host'] . $parsedUrl['path'] . '?' . $parsedUrl['query'] . $fragmentDelimiter . $parsedUrl['fragment'];
 248+ $queryDelimiter = ( !empty( $parsedUrl['query'] ) ) ? '?' : '';
 249+ self::$viewNormalSiteURL = $parsedUrl['scheme'] . '://' . $parsedUrl['host'] . $parsedUrl['path'] . $queryDelimiter . $parsedUrl['query'] . $fragmentDelimiter . $parsedUrl['fragment'];
249250 self::$currentURL = $wgRequest->getFullRequestURL();
250251 self::$leaveFeedbackURL = $wgRequest->escapeAppendQuery( 'mobileaction=leave_feedback' );
251252

Follow-up revisions

RevisionCommit summaryAuthorDate
r98454mft r98451preilly21:11, 29 September 2011
r98455mft r98451preilly21:12, 29 September 2011

Comments

#Comment by Aaron Schulz (talk | contribs)   21:11, 29 September 2011

We need a core function for this.

Status & tagging log