X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialBlock.php;h=04c04b239c677602d2a7d4d77924ca2f059c7229;hb=c1e6d8722083b5fee202e7651a2d7c51e696f481;hp=82f7d0843f6dac97f910ff4c91f0a1cb608a6367;hpb=9614ef97683e1aab4f1113527d6fe9ea1c0e68b2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index 82f7d0843f..04c04b239c 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -64,7 +64,7 @@ class SpecialBlock extends FormSpecialPage { protected function checkExecutePermissions( User $user ) { parent::checkExecutePermissions( $user ); - # bug 15810: blocked admins should have limited access here + # T17810: blocked admins should have limited access here $status = self::checkUnblockSelf( $this->target, $user ); if ( $status !== true ) { throw new ErrorPageError( 'badaccess', $status ); @@ -127,15 +127,7 @@ class SpecialBlock extends FormSpecialPage { */ protected function getFormFields() { global $wgBlockAllowsUTEdit; - if ( !wfMessage( 'ipbreason-dropdown' )->inContentLanguage()->isDisabled() ) { - $reasonsList = Xml::getArrayFromWikiTextList( - wfMessage( 'ipbreason-dropdown' )->inContentLanguage()->text() - ); - $this->getOutput()->addModules( 'mediawiki.reasonSuggest' ); - $this->getOutput()->addJsConfigVars( [ - 'reasons' => $reasonsList - ] ); - } + $user = $this->getUser(); $suggestedDurations = self::getSuggestedDurations(); @@ -283,7 +275,7 @@ class SpecialBlock extends FormSpecialPage { } // If the username was hidden (ipb_deleted == 1), don't show the reason - // unless this user also has rights to hideuser: Bug 35839 + // unless this user also has rights to hideuser: T37839 if ( !$block->mHideName || $this->getUser()->isAllowed( 'hideuser' ) ) { $fields['Reason']['default'] = $block->mReason; } else { @@ -752,7 +744,7 @@ class SpecialBlock extends FormSpecialPage { $blockNotConfirmed = !$data['Confirm'] || ( array_key_exists( 'PreviousTarget', $data ) && $data['PreviousTarget'] !== $target ); - # Special case for API - bug 32434 + # Special case for API - T34434 $reblockNotAllowed = ( array_key_exists( 'Reblock', $data ) && !$data['Reblock'] ); # Show form unless the user is already aware of this... @@ -832,12 +824,12 @@ class SpecialBlock extends FormSpecialPage { $logEntry->setComment( $data['Reason'][0] ); $logEntry->setPerformer( $performer ); $logEntry->setParameters( $logParams ); - # Relate log ID to block IDs (bug 25763) + # Relate log ID to block IDs (T27763) $blockIds = array_merge( [ $status['id'] ], $status['autoIds'] ); $logEntry->setRelations( [ 'ipb_id' => $blockIds ] ); $logId = $logEntry->insert(); - if ( count( $data['Tags'] ) ) { + if ( !empty( $data['Tags'] ) ) { $logEntry->setTags( $data['Tags'] ); } @@ -910,7 +902,7 @@ class SpecialBlock extends FormSpecialPage { } /** - * bug 15810: blocked admins should not be able to block/unblock + * T17810: blocked admins should not be able to block/unblock * others, and probably shouldn't be able to unblock themselves * either. * @param User|int|string $user