r77558 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77557‎ | r77558 | r77559 >
Date:05:27, 2 December 2010
Author:werdna
Status:ok
Tags:
Comment:
Add logging for Special:DisableAccount
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDisableAccount.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -4371,4 +4371,5 @@
43724372 'disableaccount-mustconfirm' => 'You must confirm that you wish to disable this account.',
43734373 'disableaccount-nosuchuser' => 'The user account "$1" does not exist.',
43744374 'disableaccount-success' => 'The user account "$1" has been permanently disabled.',
 4375+'disableaccount-logentry' => 'permanently disabled the user account [[$1]].',
43754376 );
Index: trunk/phase3/includes/DefaultSettings.php
@@ -4628,6 +4628,7 @@
46294629 'protect/unprotect' => 'unprotectedarticle',
46304630 'protect/move_prot' => 'movedarticleprotection',
46314631 'rights/rights' => 'rightslogentry',
 4632+ 'rights/disable' => 'disableaccount-logentry',
46324633 'delete/delete' => 'deletedarticle',
46334634 'delete/restore' => 'undeletedarticle',
46344635 'delete/revision' => 'revdelete-logentry',
Index: trunk/phase3/includes/specials/SpecialDisableAccount.php
@@ -13,6 +13,10 @@
1414 'validation-callback' => array( __CLASS__, 'validateUser' ),
1515 'label-message' => 'disableaccount-user',
1616 ),
 17+ 'comment' => array(
 18+ 'type' => 'text',
 19+ 'label-message' => 'movereason',
 20+ ),
1721 'confirm' => array(
1822 'type' => 'toggle',
1923 'validation-callback' => array( __CLASS__, 'checkConfirmation' ),
@@ -57,6 +61,10 @@
5862 $user->saveSettings();
5963 $user->invalidateCache();
6064
 65+ $logPage = new LogPage( 'rights' );
 66+
 67+ $logPage->addEntry( 'disable', $user->getUserPage(), $fields['comment'] );
 68+
6169 global $wgOut;
6270 $wgOut->addWikiMsg( 'disableaccount-success', $user->getName() );
6371

Follow-up revisions

RevisionCommit summaryAuthorDate
r77565Follow-up r77558: Use an own reason message instead of reusing another oneraymond08:29, 2 December 2010
r90856Remove disableaccount stuff from r77558. Left out from r86146 reverts.aaron21:50, 26 June 2011

Status & tagging log