r96084 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96083‎ | r96084 | r96085 >
Date:08:21, 2 September 2011
Author:siebrand
Status:ok
Tags:
Comment:
Call Linker::link() statically.
Remove unneeded constant check.
Update indentation and formatting of comments.
Modified paths:
  • /trunk/extensions/LiquidThreads/pages/SpecialMoveThread.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/pages/SpecialMoveThread.php
@@ -1,10 +1,9 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) die;
43
54 class SpecialMoveThread extends ThreadActionPage {
65 /**
7 - * @see SpecialPage::getDescription
8 - */
 6+ * @see SpecialPage::getDescription
 7+ */
98 function getDescription() {
109 return wfMsg( 'lqt_movethread' );
1110 }
@@ -35,12 +34,10 @@
3635 // Generate introduction
3736 $intro = '';
3837
39 - global $wgUser;
40 - $sk = $wgUser->getSkin();
4138 $page = $this->mThread->getTitle()->getPrefixedText();
4239
4340 $edit_text = wfMsgExt( 'lqt_move_torename_edit', 'parseinline' );
44 - $edit_link = $sk->link(
 41+ $edit_link = Linker::link(
4542 $this->mThread->title(),
4643 $edit_text,
4744 array(),
@@ -103,13 +100,12 @@
104101 if ( $rightsResult !== true )
105102 return $rightsResult;
106103
107 - // TODO no status code from this method.
 104+ // @todo No status code from this method.
108105 $this->mThread->moveToPage( $newtitle, $reason, true );
109106
110 - global $wgOut, $wgUser;
111 - $sk = $wgUser->getSkin();
 107+ global $wgOut;
112108 $wgOut->addHTML( wfMsgExt( 'lqt_move_success', array( 'parse', 'replaceafter' ),
113 - array( $sk->link( $newtitle ) ) ) );
 109+ array( Linker::link( $newtitle ) ) ) );
114110
115111 return true;
116112 }

Status & tagging log