From: Andrew Garrett Date: Thu, 2 Dec 2010 05:27:32 +0000 (+0000) Subject: Add logging for Special:DisableAccount X-Git-Tag: 1.31.0-rc.0~33652 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=28bf8846746e725aa3ff6b8ffa494b9ce20c420d;p=lhc%2Fweb%2Fwiklou.git Add logging for Special:DisableAccount --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index b179b4be8c..1bd0d69642 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4628,6 +4628,7 @@ $wgLogActions = array( 'protect/unprotect' => 'unprotectedarticle', 'protect/move_prot' => 'movedarticleprotection', 'rights/rights' => 'rightslogentry', + 'rights/disable' => 'disableaccount-logentry', 'delete/delete' => 'deletedarticle', 'delete/restore' => 'undeletedarticle', 'delete/revision' => 'revdelete-logentry', diff --git a/includes/specials/SpecialDisableAccount.php b/includes/specials/SpecialDisableAccount.php index 0df21592cd..e937a645f7 100644 --- a/includes/specials/SpecialDisableAccount.php +++ b/includes/specials/SpecialDisableAccount.php @@ -13,6 +13,10 @@ class SpecialDisableAccount extends SpecialPage { 'validation-callback' => array( __CLASS__, 'validateUser' ), 'label-message' => 'disableaccount-user', ), + 'comment' => array( + 'type' => 'text', + 'label-message' => 'movereason', + ), 'confirm' => array( 'type' => 'toggle', 'validation-callback' => array( __CLASS__, 'checkConfirmation' ), @@ -57,6 +61,10 @@ class SpecialDisableAccount extends SpecialPage { $user->saveSettings(); $user->invalidateCache(); + $logPage = new LogPage( 'rights' ); + + $logPage->addEntry( 'disable', $user->getUserPage(), $fields['comment'] ); + global $wgOut; $wgOut->addWikiMsg( 'disableaccount-success', $user->getName() ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 9dbdec5854..aee6e9c344 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -4371,4 +4371,5 @@ If the user is currently logged in anywhere, they will be immediately logged out 'disableaccount-mustconfirm' => 'You must confirm that you wish to disable this account.', 'disableaccount-nosuchuser' => 'The user account "$1" does not exist.', 'disableaccount-success' => 'The user account "$1" has been permanently disabled.', +'disableaccount-logentry' => 'permanently disabled the user account [[$1]].', );