Page MenuHomePhabricator

blockreason-1.18.patch

Authored By
bzimport
Nov 22 2014, 12:52 AM
Size
903 B
Referenced Files
None
Subscribers
None

blockreason-1.18.patch

diff -Naur mw118a/includes/specials/SpecialBlock.php mw118/includes/specials/SpecialBlock.php
--- mw118a/includes/specials/SpecialBlock.php 2011-10-25 14:33:18.000000000 -0700
+++ mw118/includes/specials/SpecialBlock.php 2012-08-27 12:27:51.764350835 -0700
@@ -251,7 +251,14 @@
if( isset( $fields['DisableUTEdit'] ) ){
$fields['DisableUTEdit']['default'] = $block->prevents( 'editownusertalk' );
}
- $fields['Reason']['default'] = $block->mReason;
+
+ // If the username was hidden (ipb_deleted == 1), don't show the reason
+ // unless this user also has rights to hideuser: Bug 35839
+ if ( !$block->mHideName || $wgUser->isAllowed( 'hideuser' ) ) {
+ $fields['Reason']['default'] = $block->mReason;
+ } else {
+ $fields['Reason']['default'] = '';
+ }
if( $wgRequest->wasPosted() ){
# Ok, so we got a POST submission asking us to reblock a user. So show the

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8710
Default Alt Text
blockreason-1.18.patch (903 B)

Event Timeline