X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialDeletedContributions.php;h=4df5b2b55f69961c1c8027a2c5cd901822e504ce;hb=f4471830752b5f33750fdd3abdc532e679bbf969;hp=6c3cb952e448c593085507c6053b4e0bf8d2b7b4;hpb=b21d7369406eac84ff667ce625ad61797fd7e352;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index 6c3cb952e4..4df5b2b55f 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -147,7 +147,7 @@ class DeletedContribsPager extends IndexPager { * written by the target user. * * @todo This would probably look a lot nicer in a table. - * @param $row + * @param stdClass $row * @return string */ function formatRow( $row ) { @@ -276,7 +276,7 @@ class DeletedContribsPager extends IndexPager { class DeletedContributionsPage extends SpecialPage { function __construct() { parent::__construct( 'DeletedContributions', 'deletedhistory', - /*listed*/true, /*function*/false, /*file*/false ); + /*listed*/true, /*function*/false, /*file*/false ); } /** @@ -375,8 +375,8 @@ class DeletedContributionsPage extends SpecialPage { /** * Generates the subheading with links - * @param $userObj User object for the target - * @return String: appropriately-escaped HTML to be output literally + * @param User $userObj User object for the target + * @return string Appropriately-escaped HTML to be output literally * @todo FIXME: Almost the same as contributionsSub in SpecialContributions.php. Could be combined. */ function getSubTitle( $userObj ) { @@ -472,7 +472,12 @@ class DeletedContributionsPage extends SpecialPage { $links = $this->getLanguage()->pipeList( $tools ); // Show a note if the user is blocked and display the last block log entry. - if ( $userObj->isBlocked() ) { + $block = Block::newFromTarget( $userObj, $userObj ); + if ( !is_null( $block ) && $block->getType() != Block::TYPE_AUTO ) { + if ( $block->getType() == Block::TYPE_RANGE ) { + $nt = MWNamespace::getCanonicalName( NS_USER ) . ':' . $block->getTarget(); + } + // LogEventsList::showLogExtract() wants the first parameter by ref $out = $this->getOutput(); LogEventsList::showLogExtract( @@ -485,7 +490,7 @@ class DeletedContributionsPage extends SpecialPage { 'showIfEmpty' => false, 'msgKey' => array( 'sp-contributions-blocked-notice', - $nt->getText() # Support GENDER in 'sp-contributions-blocked-notice' + $userObj->getName() # Support GENDER in 'sp-contributions-blocked-notice' ), 'offset' => '' # don't use $this->getRequest() parameter offset ) @@ -498,7 +503,7 @@ class DeletedContributionsPage extends SpecialPage { /** * Generates the namespace selector form with hidden attributes. - * @param array $options the options to be included. + * @param array $options The options to be included. * @return string */ function getForm( $options ) {