From ae10b67ad341549450e527264f96366c88d7925f Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Thu, 15 Nov 2007 14:42:20 +0000 Subject: [PATCH] Show 'no reason given' rather than a single apostrophe in a 'user blocked' page, when no reason is given for a block. --- includes/OutputPage.php | 3 +++ includes/Title.php | 3 +++ languages/messages/MessagesEn.php | 1 + languages/messages/MessagesHe.php | 1 + maintenance/language/messages.inc | 1 + 5 files changed, 9 insertions(+) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b756f558f1..25385f0da8 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -764,6 +764,9 @@ class OutputPage { $name = User::whoIs( $wgUser->blockedBy() ); $reason = $wgUser->blockedFor(); + if( $reason == '' ) { + $reason = wfMsg( 'blockednoreason' ); + } $blockTimestamp = $wgLang->timeanddate( wfTimestamp( TS_MW, $wgUser->mBlock->mTimestamp ), true ); $ip = wfGetIP(); diff --git a/includes/Title.php b/includes/Title.php index 712eccf72a..49a93ceacc 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1056,6 +1056,9 @@ class Title { $id = $user->blockedBy(); $reason = $user->blockedFor(); + if( $reason == '' ) { + $reason = wfMsg( 'blockednoreason' ); + } $ip = wfGetIP(); if ( is_numeric( $id ) ) { diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 25511e975e..d34d62dd1f 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -977,6 +977,7 @@ 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.', +'blockednoreason' => 'no reason given', 'blockedoriginalsource' => "The source of '''$1''' is shown below:", 'blockededitsource' => "The text of '''your edits''' to '''$1''' is shown below:", diff --git a/languages/messages/MessagesHe.php b/languages/messages/MessagesHe.php index b4771a8c34..7acf60e7b6 100644 --- a/languages/messages/MessagesHe.php +++ b/languages/messages/MessagesHe.php @@ -788,6 +788,7 @@ $2', באפשרותכם ליצור קשר עם $1 או עם כל אחד מ[[Project:מפעיל מערכת|מפעילי המערכת]] האחרים כדי לדון על החסימה. אינכם יכולים להשתמש בתכונת "שלחו דואר אלקטרוני למשתמש זה" אם לא ציינתם כתובת דוא"ל תקפה ב[[Special:Preferences|העדפות המשתמש שלכם]] או אם נחסמתם משליחת דוא"ל. מספר החסימה שלכם הוא #$5. אנא ציינו זאת בכל פנייה למפעילי המערכת.', +'blockedreason' => 'לא ניתנה סיבה', 'blockedoriginalsource' => "טקסט המקור של '''$1''' מוצג למטה:", 'blockededitsource' => "הטקסט של '''העריכות שלך''' לדף '''$1''' מוצג למטה:", 'whitelistedittitle' => 'כניסה לחשבון נדרשת לעריכה', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 3343ed5471..bbcb108658 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -461,6 +461,7 @@ $wgMessageStructure = array( 'blockedtitle', 'blockedtext', 'autoblockedtext', + 'blockednoreason', 'blockedoriginalsource', 'blockededitsource', 'whitelistedittitle', -- 2.20.1