r74548 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74547‎ | r74548 | r74549 >
Date:13:56, 9 October 2010
Author:platonides
Status:ok
Tags:
Comment:
Use wfAppendQuery()
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuthHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/CentralAuthHooks.php
@@ -136,16 +136,8 @@
137137 $wgMemc->set( CentralAuthUser::memcKey( 'login-token', $loginToken ), $data, 600 );
138138
139139 $wiki = WikiMap::getWiki( $wiki );
140 - $url = $wiki->getUrl( 'Special:AutoLogin' );
 140+ $url = wfAppendQuery( $wiki->getUrl( 'Special:AutoLogin' ), "token=$loginToken" );
141141
142 - $querystring = 'token=' . $loginToken;
143 -
144 - if ( strpos( $url, '?' ) > 0 ) {
145 - $url .= "&$querystring";
146 - } else {
147 - $url .= "?$querystring";
148 - }
149 -
150142 $inject_html .= Xml::element( 'img',
151143 array(
152144 'src' => $url,

Status & tagging log