From 928a2a6086583447c6dd7929d742086cfac803fc Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Mon, 27 Aug 2007 16:01:11 +0000 Subject: [PATCH] Remove 'blockedtext-concise'/'autoblockedtext-concise' messages, they are redundant to 'blockedtext/'autoblockedtext' I do not see a reason why to maintain four very very similar messages instead of two messages. Add $blockTimestamp as $8. It's used in OutputPage.php for these messages too. --- includes/Title.php | 3 ++- languages/messages/MessagesEn.php | 6 ------ maintenance/language/messages.inc | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 35d57dbf7e..f74192b164 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1066,6 +1066,7 @@ class Title { $link = '[[' . $wgContLang->getNsText( NS_USER ) . ":{$name}|{$name}]]"; $blockid = $block->mId; $blockExpiry = $user->mBlock->mExpiry; + $blockTimestamp = $wgLang->timeanddate( wfTimestamp( TS_MW, $wgUser->mBlock->mTimestamp ), true ); if ( $blockExpiry == 'infinity' ) { // Entry in database (table ipblocks) is 'infinity' but 'ipboptions' uses 'infinite' or 'indefinite' @@ -1088,7 +1089,7 @@ class Title { $intended = $user->mBlock->mAddress; - $errors[] = array ( ($block->mAuto ? 'autoblockedtext-concise' : 'blockedtext-concise'), $link, $reason, $ip, $name, $blockid, $blockExpiry, $intended ); + $errors[] = array ( ($block->mAuto ? 'autoblockedtext' : 'blockedtext'), $link, $reason, $ip, $name, $blockid, $blockExpiry, $intended, $blockTimestamp ); } return $errors; diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 3d36fc98b7..c58ba16f4b 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -979,12 +979,6 @@ Note that you may not use the "e-mail this user" feature unless you have a valid registered in your [[Special:Preferences|user preferences]] and you have not been blocked from using it. Your block ID is $5. Please include this ID in any queries you make.', -'blockedtext-concise' => "$7, which matches your username or IP address, has been blocked by $1. The reason given was $2. The expiry time of this block is $6. To discuss the block, you can -contact $1, or another administrator. You cannot use the 'email this user' feature unless a valid email address is specified in your account preferences and you have not been blocked from using it. -Your current IP address is $3, and the block ID is #$5. Please include either or both of these in any queries.", -'autoblockedtext-concise' => "Your IP address has recently been used by a user who was blocked. The block was made by $1. The reason given was $2. The expiry time of this block is $6. To -discuss the block, you can contact $1, or another administrator. You cannot use the 'email this user' feature unless a valid email address is specified in your account preferences and you have not -been blocked from using it. Your current IP address is $3, and the block ID is #$5. Please include either or both of these in any queries.", 'blockedoriginalsource' => "The source of '''$1''' is shown below:", 'blockededitsource' => "The text of '''your edits''' to '''$1''' is shown below:", diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 316a73429b..7ecd463da5 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -458,8 +458,6 @@ $wgMessageStructure = array( 'blockedtitle', 'blockedtext', 'autoblockedtext', - 'blockedtext-concise', - 'autoblockedtext-concise', 'blockedoriginalsource', 'blockededitsource', 'whitelistedittitle', -- 2.20.1