r64541 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64540‎ | r64541 | r64542 >
Date:21:52, 2 April 2010
Author:tparscal
Status:ok
Tags:
Comment:
Now we check if there's something to return to before showing the return link.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/PrefSwitch/SpecialPrefSwitch.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/PrefSwitch/SpecialPrefSwitch.php
@@ -142,9 +142,11 @@
143143 $this->render( 'main' );
144144 }
145145 // Always show a way back
146 - $wgOut->addWikiMsgArray(
147 - 'prefswitch-return', array( $this->originFullUrl, $this->originTitle ), array( 'parse' )
148 - );
 146+ if ( $this->originTitle && $this->originFullUrl ) {
 147+ $wgOut->addWikiMsgArray(
 148+ 'prefswitch-return', array( $this->originFullUrl, $this->originTitle ), array( 'parse' )
 149+ );
 150+ }
149151 // Set page title
150152 if ( self::isSwitchedOn( $wgUser ) ) {
151153 switch ( $wgRequest->getVal( 'mode' ) ) {

Status & tagging log