r93591 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93590‎ | r93591 | r93592 >
Date:15:16, 31 July 2011
Author:hartman
Status:ok
Tags:
Comment:
Use wfAppendQuery instead of reimplementation.
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -108,8 +108,7 @@
109109 global $wgRequest;
110110 $footerlinks = $tpl->data['footerlinks'];
111111 $mobileViewUrl = $wgRequest->getRequestURL();
112 - $delimiter = ( strpos( $mobileViewUrl, "?" ) !== false ) ? "&" : "?";
113 - $mobileViewUrl .= $delimiter . 'useFormat=mobile';
 112+ $mobileViewUrl = wfAppendQuery( $mobileViewUrl, 'useFormat=mobile' );
114113 $mobileViewUrl = htmlspecialchars( $mobileViewUrl );
115114
116115 $tpl->set('mobileview', "<a href='{$mobileViewUrl}'>".wfMsg( 'mobile-frontend-view')."</a>");

Follow-up revisions

RevisionCommit summaryAuthorDate
r93650Wow, apparently WebRequest has it's own versions of these appendQuery().hartman20:42, 1 August 2011

Status & tagging log