X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FLinker.php;h=2e0011cf44f017889d67437657c7ee8bb9038982;hp=01f695a31f759f9e8003b53aab827d724b170d50;hb=c05b8b7c473a7dd9c832f91366c45cb8a35c2df2;hpb=ba0dff9630772f80a402eef03ec674f7a6a271c4 diff --git a/includes/Linker.php b/includes/Linker.php index 01f695a31f..2e0011cf44 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1116,17 +1116,22 @@ class Linker { * @return string HTML */ public static function revUserTools( $rev, $isPublic = false, $useParentheses = true ) { - if ( $rev->isDeleted( Revision::DELETED_USER ) && $isPublic ) { - $link = wfMessage( 'rev-deleted-user' )->escaped(); - } elseif ( $rev->userCan( Revision::DELETED_USER ) ) { + if ( $rev->userCan( Revision::DELETED_USER ) && + ( !$rev->isDeleted( Revision::DELETED_USER ) || !$isPublic ) + ) { $userId = $rev->getUser( Revision::FOR_THIS_USER ); $userText = $rev->getUserText( Revision::FOR_THIS_USER ); - $link = self::userLink( $userId, $userText ) - . self::userToolLinks( $userId, $userText, false, 0, null, - $useParentheses ); - } else { + if ( $userId || (string)$userText !== '' ) { + $link = self::userLink( $userId, $userText ) + . self::userToolLinks( $userId, $userText, false, 0, null, + $useParentheses ); + } + } + + if ( !isset( $link ) ) { $link = wfMessage( 'rev-deleted-user' )->escaped(); } + if ( $rev->isDeleted( Revision::DELETED_USER ) ) { return ' ' . $link . ''; }