Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php |
— | — | @@ -246,17 +246,19 @@ |
247 | 247 | static function cancelLinkHTML( $is_disabled, $label = null, $attr = array() ) { |
248 | 248 | global $wgTitle; |
249 | 249 | |
250 | | - $linker = class_exists( 'DummyLinker' ) ? new DummyLinker() : new Linker(); |
251 | | - if ( $label == null ) |
| 250 | + if ( $label == null ) { |
252 | 251 | $label = wfMsgExt( 'cancel', array( 'parseinline' ) ); |
253 | | - if ( $wgTitle == null ) |
| 252 | + } |
| 253 | + if ( $wgTitle == null ) { |
254 | 254 | $cancel = ''; |
| 255 | + } |
255 | 256 | // if we're on the special 'FormEdit' page, just send the user |
256 | 257 | // back to the previous page they were on |
257 | 258 | elseif ( $wgTitle->getText() == 'FormEdit' |
258 | 259 | && $wgTitle->getNamespace() == NS_SPECIAL ) { |
259 | 260 | $cancel = '<a href="javascript:history.go(-1);">' . $label . '</a>'; |
260 | 261 | } else { |
| 262 | + $linker = class_exists( 'DummyLinker' ) ? new DummyLinker() : new Linker(); |
261 | 263 | $cancel = $linker->link( $wgTitle, $label, array(), array(), 'known' ); |
262 | 264 | } |
263 | 265 | $text = "\t\t<span class='editHelp'>$cancel</span>\n"; |