r83040 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83039‎ | r83040 | r83041 >
Date:19:53, 1 March 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Documentation
Modified paths:
  • /trunk/extensions/Renameuser/Renameuser.php (modified) (history)
  • /trunk/extensions/Renameuser/Renameuser_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Renameuser/Renameuser_body.php
@@ -274,7 +274,7 @@
275275 // Move any user pages
276276 if ( $wgRequest->getCheck( 'movepages' ) && $wgUser->isAllowed( 'move' ) ) {
277277 $dbr = wfGetDB( DB_SLAVE );
278 - $oldkey = $oldusername->getDBkey();
 278+
279279 $pages = $dbr->select(
280280 'page',
281281 array( 'page_namespace', 'page_title' ),
@@ -285,9 +285,9 @@
286286 ),
287287 __METHOD__
288288 );
289 -
 289+
290290 $suppressRedirect = false;
291 -
 291+
292292 if ( $wgRequest->getCheck( 'suppressredirect' ) && $wgUser->isAllowed( 'suppressredirect' ) ) {
293293 $suppressRedirect = true;
294294 }
@@ -325,6 +325,12 @@
326326 array( 'renameusersuccess', $oldusername->getText(), $newusername->getText() ) );
327327 }
328328
 329+ /**
 330+ * @param $username Title
 331+ * @param $type
 332+ * @param $out
 333+ * @return void
 334+ */
329335 function showLogExtract( $username, $type, &$out ) {
330336 # Show relevant lines from the logs:
331337 $out->addHTML( Xml::element( 'h2', null, LogPage::logName( $type ) ) . "\n" );
Index: trunk/extensions/Renameuser/Renameuser.php
@@ -42,6 +42,15 @@
4343 # $wgLogActions['renameuser/renameuser'] = 'renameuserlogentry';
4444 $wgLogActionsHandlers['renameuser/renameuser'] = 'wfRenameUserLogActionText'; // deal with old breakage
4545
 46+/**
 47+ * @param $type
 48+ * @param $action
 49+ * @param $title Title
 50+ * @param $skin Skin
 51+ * @param $params array
 52+ * @param $filterWikilinks bool
 53+ * @return String
 54+ */
4655 function wfRenameUserLogActionText( $type, $action, $title = null, $skin = null, $params = array(), $filterWikilinks = false ) {
4756 if ( !$title || $title->getNamespace() !== NS_USER ) {
4857 $rv = ''; // handled in comment, the old way
@@ -83,6 +92,12 @@
8493 return true;
8594 }
8695
 96+/**
 97+ * @param $id
 98+ * @param $nt Title
 99+ * @param $tools
 100+ * @return bool
 101+ */
87102 function wfRenameuserOnContribsLink( $id, $nt, &$tools ) {
88103 global $wgUser;
89104

Comments

#Comment by Hashar (talk | contribs)   20:52, 1 March 2011

There is a change not related to "Documentation" !

- $oldkey = $oldusername->getDBkey();
#Comment by Reedy (talk | contribs)   20:53, 1 March 2011

Bleh.

Not a fixme, the variable is unused

#Comment by Hashar (talk | contribs)   07:13, 2 March 2011

Oops .. marked ok!

Status & tagging log