diff options
Diffstat (limited to 'includes/specials')
-rw-r--r-- | includes/specials/SpecialBlock.php | 8 | ||||
-rw-r--r-- | includes/specials/SpecialUserlogin.php | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index 7d93cc75..da8eed1b 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -257,7 +257,13 @@ class SpecialBlock extends FormSpecialPage { $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 || $this->getUser()->isAllowed( 'hideuser' ) ) { + $fields['Reason']['default'] = $block->mReason; + } else { + $fields['Reason']['default'] = ''; + } if( $this->getRequest()->wasPosted() ){ # Ok, so we got a POST submission asking us to reblock a user. So show the diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 13ea5def..764ff401 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -326,6 +326,12 @@ class LoginForm extends SpecialPage { return false; } + # Include checks that will include GlobalBlocking (Bug 38333) + $permErrors = $this->getTitle()->getUserPermissionsErrors( 'createaccount', $currentUser, true ); + if ( count( $permErrors ) ) { + throw new PermissionsError( 'createaccount', $permErrors ); + } + $ip = $this->getRequest()->getIP(); if ( $currentUser->isDnsBlacklisted( $ip, true /* check $wgProxyWhitelist */ ) ) { $this->mainLoginForm( $this->msg( 'sorbs_create_account_reason' )->text() . ' (' . htmlspecialchars( $ip ) . ')' ); |