r101154 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101153‎ | r101154 | r101155 >
Date:17:25, 28 October 2011
Author:preilly
Status:ok
Tags:
Comment:
use delimiter from wfParseUrl() call
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -360,12 +360,8 @@
361361 }
362362 $fragmentDelimiter = ( !empty( $parsedUrl['fragment'] ) ) ? '#' : '';
363363 $queryDelimiter = ( !empty( $parsedUrl['query'] ) ) ? '?' : '';
364 - $languageUrl = $parsedUrl['scheme'] . '://' . $parsedUrl['host'] . $parsedUrl['path'] . $queryDelimiter . $parsedUrl['query'] . $fragmentDelimiter . $parsedUrl['fragment'];
 364+ $languageUrl = $parsedUrl['scheme'] . $parsedUrl['delimiter'] . $parsedUrl['host'] . $parsedUrl['path'] . $queryDelimiter . $parsedUrl['query'] . $fragmentDelimiter . $parsedUrl['fragment'];
365365
366 - if ( substr( $languageUrl, 0, 1 ) == ':' ) {
367 - $languageUrl = substr( $languageUrl, 1 );
368 - }
369 -
370366 $languageUrls[] = array(
371367 'href' => $languageUrl,
372368 'text' => $linkText,

Follow-up revisions

RevisionCommit summaryAuthorDate
r101155mft r101154preilly17:25, 28 October 2011

Status & tagging log