r105324 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105323‎ | r105324 | r105325 >
Date:18:36, 6 December 2011
Author:preilly
Status:resolved
Tags:
Comment:
getLocalUrl accepts also an array of parameters and does the escaping
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -88,7 +88,7 @@
8989 }
9090
9191 class ExtMobileFrontend {
92 - const VERSION = '0.5.91';
 92+ const VERSION = '0.5.92';
9393
9494 /**
9595 * @var DOMDocument
@@ -589,9 +589,14 @@
590590
591591 if ( self::$title->isSpecial( 'Userlogin' ) && self::$isBetaGroupMember ) {
592592 self::$wsLoginToken = $wgRequest->getSessionData( 'wsLoginToken' );
 593+ $q = array( 'action' => 'submitlogin' );
593594 $returnToVal = $wgRequest->getVal( 'returnto' );
594 - $returnto = ( !empty( $returnToVal ) ) ? '&returnto=' . wfUrlencode( $returnToVal ) : '';
595 - self::$wsLoginFormAction = self::$title->getLocalURL( 'action=submitlogin&type=login' . $returnto );
 595+
 596+ if ( !empty( $returnToVal ) ) {
 597+ $q['returnto'] = $returnToVal;
 598+ }
 599+
 600+ self::$wsLoginFormAction = self::$title->getLocalURL( $q );
596601 }
597602
598603 $this->setDefaultLogo();

Follow-up revisions

RevisionCommit summaryAuthorDate
r105325and type key to arraypreilly18:38, 6 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104518remove unnecessary dom parsingpreilly00:21, 29 November 2011

Status & tagging log