From c6fd499b8c69bdb24db3f34616fe556e609b4c0c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 20 Apr 2007 14:44:55 +0000 Subject: [PATCH] Reverting r21000 for the moment (predefined block messages). The defaults aren't very good, and I'm not sure I like the implementation. May return after some review and tweaking. --- RELEASE-NOTES | 1 - includes/SpecialBlockip.php | 59 +++++-------------------------- languages/messages/MessagesDe.php | 9 ----- languages/messages/MessagesEn.php | 15 +------- maintenance/language/messages.inc | 3 -- 5 files changed, 10 insertions(+), 77 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8bd3fcc2b7..ba1b0e54b1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -112,7 +112,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 9177) Installer now warns of various conditions affecting session.save_path which can lead to broken session storage * (bug 9046) Special page to list pages without language links -* Predefined block reasons added to Special:Blockip * (bug 9508) Special page to list articles with the fewest revisions * Introduce 'FileUpload' hook; see docs/hooks.txt for more information * Introduce 'SearchUpdate' hook; see docs/hooks.txt for more information diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index 2f361aadcc..5b73ef44cd 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -50,7 +50,6 @@ class IPBlockForm { $this->BlockAddress = $wgRequest->getVal( 'wpBlockAddress', $wgRequest->getVal( 'ip', $par ) ); $this->BlockAddress = strtr( $this->BlockAddress, '_', ' ' ); $this->BlockReason = $wgRequest->getText( 'wpBlockReason' ); - $this->BlockReasonList = $wgRequest->getText( 'wpBlockReasonList' ); $this->BlockExpiry = $wgRequest->getVal( 'wpBlockExpiry', wfMsg('ipbotheroption') ); $this->BlockOther = $wgRequest->getVal( 'wpBlockOther', '' ); @@ -78,11 +77,7 @@ class IPBlockForm { $mIpbexpiry = Xml::label( wfMsg( 'ipbexpiry' ), 'wpBlockExpiry' ); $mIpbother = Xml::label( wfMsg( 'ipbother' ), 'mw-bi-other' ); $mIpbothertime = wfMsgHtml( 'ipbotheroption' ); - - $mIpbreasonother = Xml::label( wfMsg( 'ipbreason' ), 'wpBlockReasonList' ); - $mIpbreason = Xml::label( wfMsg( 'ipbotherreason' ), 'mw-bi-reason' ); - $mIpbreasonotherlist = wfMsgHtml( 'ipbreasonotherlist' ); - + $mIpbreason = Xml::label( wfMsg( 'ipbreason' ), 'mw-bi-reason' ); $titleObj = SpecialPage::getTitleFor( 'Blockip' ); $action = $titleObj->escapeLocalURL( "action=submit" ); @@ -109,26 +104,6 @@ class IPBlockForm { $blockExpiryFormOptions .= ""; } - $scBlockReasonList = wfMsgForContent( 'ipbreason-list' ); - $blockReasonList = ""; - $optgroup = ""; - foreach ( explode( '*', $scBlockReasonList ) as $option) { - $value = trim( htmlspecialchars($option) ); - if ( $value == '' ) - continue; - if ( substr( $value, 0, 1) == '#' ) { - $value = substr( $value, 1 ); - $blockReasonList .= "$optgroup"; - $optgroup = ""; - } else { - $selected = ""; - if ( $this->BlockReasonList === $value) - $selected = ' selected="selected"'; - $blockReasonList .= ""; - } - } - $blockReasonList .= $optgroup; - $token = htmlspecialchars( $wgUser->editToken() ); global $wgStylePath, $wgStyleVersion; @@ -169,18 +144,10 @@ class IPBlockForm { - {$mIpbreasonother}: - - - - - {$mIpbreason}: " . Xml::input( 'wpBlockReason', 45, $this->BlockReason, - array( 'tabindex' => '5', 'id' => 'mw-bi-reason' ) ) . " + array( 'tabindex' => '3', 'id' => 'mw-bi-reason' ) ) . " @@ -188,7 +155,7 @@ class IPBlockForm { " . wfCheckLabel( wfMsgHtml( 'ipbanononly' ), 'wpAnonOnly', 'wpAnonOnly', $this->BlockAnonOnly, - array( 'tabindex' => '6' ) ) . " + array( 'tabindex' => '4' ) ) . " @@ -196,7 +163,7 @@ class IPBlockForm { " . wfCheckLabel( wfMsgHtml( 'ipbcreateaccount' ), 'wpCreateAccount', 'wpCreateAccount', $this->BlockCreateAccount, - array( 'tabindex' => '7' ) ) . " + array( 'tabindex' => '5' ) ) . " @@ -204,7 +171,7 @@ class IPBlockForm { " . wfCheckLabel( wfMsgHtml( 'ipbenableautoblock' ), 'wpEnableAutoblock', 'wpEnableAutoblock', $this->BlockEnableAutoblock, - array( 'tabindex' => '8' ) ) . " + array( 'tabindex' => '6' ) ) . " "); @@ -216,7 +183,7 @@ class IPBlockForm { " . wfCheckLabel( wfMsgHtml( 'ipbhidename' ), 'wpHideName', 'wpHideName', $this->BlockHideName, - array( 'tabindex' => '9' ) ) . " + array( 'tabindex' => '6' ) ) . " "); @@ -226,7 +193,7 @@ class IPBlockForm {   " . Xml::submitButton( wfMsgHtml( 'ipbsubmit' ), - array( 'name' => 'wpBlock', 'tabindex' => '10' ) ) . " + array( 'name' => 'wpBlock', 'tabindex' => '7' ) ) . " " . @@ -306,14 +273,6 @@ class IPBlockForm { } } - $reasonstr = $this->BlockReasonList; - if ( $reasonstr != 'other' && $this->BlockReason != '') { - // Entry from drop down menu + additional comment - $reasonstr .= ': ' . $this->BlockReason; - } elseif ( $reasonstr == 'other' ) { - $reasonstr = $this->BlockReason; - } - $expirestr = $this->BlockExpiry; if( $expirestr == 'other' ) $expirestr = $this->BlockOther; @@ -341,7 +300,7 @@ class IPBlockForm { # Note: for a user block, ipb_address is only for display purposes $block = new Block( $this->BlockAddress, $userId, $wgUser->getID(), - $reasonstr, wfTimestampNow(), 0, $expiry, $this->BlockAnonOnly, + $this->BlockReason, wfTimestampNow(), 0, $expiry, $this->BlockAnonOnly, $this->BlockCreateAccount, $this->BlockEnableAutoblock, $this->BlockHideName); if (wfRunHooks('BlockIp', array(&$block, &$wgUser))) { @@ -363,7 +322,7 @@ class IPBlockForm { $log_type = ($this->BlockHideName) ? 'oversight' : 'block'; $log = new LogPage( $log_type ); $log->addEntry( 'block', Title::makeTitle( NS_USER, $this->BlockAddress ), - $reasonstr, $logParams ); + $this->BlockReason, $logParams ); # Report to the user $titleObj = SpecialPage::getTitleFor( 'Blockip' ); diff --git a/languages/messages/MessagesDe.php b/languages/messages/MessagesDe.php index 0ce315bf41..624f6d658d 100644 --- a/languages/messages/MessagesDe.php +++ b/languages/messages/MessagesDe.php @@ -1510,14 +1510,6 @@ Bitte geben Sie den Grund für die Sperre an.', 'ipadressorusername' => 'IP-Adresse oder Benutzername', 'ipbexpiry' => 'Sperrdauer', 'ipbreason' => 'Begründung', -'ipbreasonotherlist' => 'Andere Begründung', -'ipbreason-list' => ' -*#Sperrgründe für IP-Adressen -*Vandalismus -*Weblink-Spam -*#Sperrgründe für Benutzernamen -*Beleidigungen -*Sockenpuppe', 'ipbanononly' => 'Nur anonyme Benutzer sperren', 'ipbcreateaccount' => 'Erstellung von Benutzerkonten verhindern', 'ipbenableautoblock' => 'Sperre die aktuell von diesem Benutzer genutzte IP-Adresse sowie automatisch alle folgenden, von denen aus er Bearbeitungen oder das Anlegen von Benutzeraccounts versucht', @@ -1525,7 +1517,6 @@ Bitte geben Sie den Grund für die Sperre an.', 'ipbother' => 'Andere Dauer (englisch)', 'ipboptions' => '1 Stunde:1 hour,2 Stunden:2 hours,6 Stunden:6 hours,1 Tag:1 day,3 Tage:3 days,1 Woche:1 week,2 Wochen:2 weeks,1 Monat:1 month,3 Monate:3 months,1 Jahr:1 year,Unbeschränkt:indefinite', 'ipbotheroption' => 'Andere Dauer', -'ipbotherreason' => 'Andere/ergänzende Begründung', 'ipbhidename' => 'Benutzername/IP-Adresse im Sperr-Logbuch, der Liste aktiver Sperren und dem Benutzerverzeichnis verstecken.', 'badipaddress' => 'Die IP-Adresse hat ein falsches Format.', 'blockipsuccesssub' => 'Sperre erfolgreich', diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 3f88b0f198..1a26ec3af6 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1946,18 +1946,6 @@ pages that were vandalized).", 'ipadressorusername' => 'IP Address or username', 'ipbexpiry' => 'Expiry', 'ipbreason' => 'Reason', -'ipbreasonotherlist' => 'Other reason', - -// These are examples only. They can be translated but should be adjusted via [[MediaWiki:ipbreason-list]] by the local community -// *# defines a reason group in the drow down menu -// * defines a reason -'ipbreason-list' => ' -*#Block reasons for IP adresses -*vandalism -*linkspam -*#Block reasons for usernames -*insults -*sockpuppet', 'ipbanononly' => 'Block anonymous users only', 'ipbcreateaccount' => 'Prevent account creation', 'ipbenableautoblock' => 'Automatically block the last IP address used by this user, and any subsequent IPs they try to edit from', @@ -1965,7 +1953,6 @@ pages that were vandalized).", 'ipbother' => 'Other time', 'ipboptions' => '2 hours:2 hours,1 day:1 day,3 days:3 days,1 week:1 week,2 weeks:2 weeks,1 month:1 month,3 months:3 months,6 months:6 months,1 year:1 year,infinite:infinite', 'ipbotheroption' => 'other', -'ipbotherreason' => 'Other/additional reason', 'ipbhidename' => 'Hide username/IP from the block log, active block list and user list', 'badipaddress' => 'Invalid IP address', 'blockipsuccesssub' => 'Block succeeded', @@ -1993,7 +1980,7 @@ to a previously blocked IP address or username.', 'blocklink' => 'block', 'unblocklink' => 'unblock', 'contribslink' => 'contribs', -'autoblocker' => 'Autoblocked because your IP address has been recently used by "[[User:$1|$1]]". The reason given for $1\'s block is: "$2"', +'autoblocker' => 'Autoblocked because your IP address has been recently used by "[[User:$1|$1]]". The reason given for $1\'s block is: "\'\'\'$2\'\'\'"', 'blocklogpage' => 'Block log', 'blocklogentry' => 'blocked "[[$1]]" with an expiry time of $2 $3', 'blocklogtext' => 'This is a log of user blocking and unblocking actions. Automatically diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 9add017cd2..45120f5985 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1265,8 +1265,6 @@ $wgMessageStructure = array( 'ipadressorusername', 'ipbexpiry', 'ipbreason', - 'ipbreasonotherlist', - 'ipbreason-list', 'ipbanononly', 'ipbcreateaccount', 'ipbenableautoblock', @@ -1274,7 +1272,6 @@ $wgMessageStructure = array( 'ipbother', 'ipboptions', 'ipbotheroption', - 'ipbotherreason', 'ipbhidename', 'badipaddress', 'blockipsuccesssub', -- 2.20.1