r111721 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111720‎ | r111721 | r111722 >
Date:02:26, 17 February 2012
Author:yaron
Status:ok
Tags:
Comment:
More improvements
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php
@@ -246,17 +246,19 @@
247247 static function cancelLinkHTML( $is_disabled, $label = null, $attr = array() ) {
248248 global $wgTitle;
249249
250 - $linker = class_exists( 'DummyLinker' ) ? new DummyLinker() : new Linker();
251 - if ( $label == null )
 250+ if ( $label == null ) {
252251 $label = wfMsgExt( 'cancel', array( 'parseinline' ) );
253 - if ( $wgTitle == null )
 252+ }
 253+ if ( $wgTitle == null ) {
254254 $cancel = '';
 255+ }
255256 // if we're on the special 'FormEdit' page, just send the user
256257 // back to the previous page they were on
257258 elseif ( $wgTitle->getText() == 'FormEdit'
258259 && $wgTitle->getNamespace() == NS_SPECIAL ) {
259260 $cancel = '<a href="javascript:history.go(-1);">' . $label . '</a>';
260261 } else {
 262+ $linker = class_exists( 'DummyLinker' ) ? new DummyLinker() : new Linker();
261263 $cancel = $linker->link( $wgTitle, $label, array(), array(), 'known' );
262264 }
263265 $text = "\t\t<span class='editHelp'>$cancel</span>\n";

Status & tagging log