Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1265,6 +1265,8 @@ |
1266 | 1266 | 'ipadressorusername', |
1267 | 1267 | 'ipbexpiry', |
1268 | 1268 | 'ipbreason', |
| 1269 | + 'ipbreasonotherlist', |
| 1270 | + 'ipbreason-dropdown', |
1269 | 1271 | 'ipbanononly', |
1270 | 1272 | 'ipbcreateaccount', |
1271 | 1273 | 'ipbenableautoblock', |
— | — | @@ -1272,10 +1274,12 @@ |
1273 | 1275 | 'ipbother', |
1274 | 1276 | 'ipboptions', |
1275 | 1277 | 'ipbotheroption', |
| 1278 | + 'ipbotherreason', |
1276 | 1279 | 'ipbhidename', |
1277 | 1280 | 'badipaddress', |
1278 | 1281 | 'blockipsuccesssub', |
1279 | 1282 | 'blockipsuccesstext', |
| 1283 | + 'ipb-edit-dropdown', |
1280 | 1284 | 'ipb-unblock-addr', |
1281 | 1285 | 'ipb-unblock', |
1282 | 1286 | 'ipb-blocklist-addr', |
Index: trunk/phase3/includes/SpecialBlockip.php |
— | — | @@ -50,6 +50,7 @@ |
51 | 51 | $this->BlockAddress = $wgRequest->getVal( 'wpBlockAddress', $wgRequest->getVal( 'ip', $par ) ); |
52 | 52 | $this->BlockAddress = strtr( $this->BlockAddress, '_', ' ' ); |
53 | 53 | $this->BlockReason = $wgRequest->getText( 'wpBlockReason' ); |
| 54 | + $this->BlockReasonList = $wgRequest->getText( 'wpBlockReasonList' ); |
54 | 55 | $this->BlockExpiry = $wgRequest->getVal( 'wpBlockExpiry', wfMsg('ipbotheroption') ); |
55 | 56 | $this->BlockOther = $wgRequest->getVal( 'wpBlockOther', '' ); |
56 | 57 | |
— | — | @@ -77,7 +78,10 @@ |
78 | 79 | $mIpbexpiry = Xml::label( wfMsg( 'ipbexpiry' ), 'wpBlockExpiry' ); |
79 | 80 | $mIpbother = Xml::label( wfMsg( 'ipbother' ), 'mw-bi-other' ); |
80 | 81 | $mIpbothertime = wfMsgHtml( 'ipbotheroption' ); |
81 | | - $mIpbreason = Xml::label( wfMsg( 'ipbreason' ), 'mw-bi-reason' ); |
| 82 | + $mIpbreasonother = Xml::label( wfMsg( 'ipbreason' ), 'wpBlockReasonList' ); |
| 83 | + $mIpbreason = Xml::label( wfMsg( 'ipbotherreason' ), 'mw-bi-reason' ); |
| 84 | + $mIpbreasonotherlist = wfMsgHtml( 'ipbreasonotherlist' ); |
| 85 | + |
82 | 86 | $titleObj = SpecialPage::getTitleFor( 'Blockip' ); |
83 | 87 | $action = $titleObj->escapeLocalURL( "action=submit" ); |
84 | 88 | |
— | — | @@ -104,6 +108,39 @@ |
105 | 109 | $blockExpiryFormOptions .= "<option value=\"$value\"$selected>$show</option>"; |
106 | 110 | } |
107 | 111 | |
| 112 | + $scBlockReasonList = wfMsgForContent( 'ipbreason-dropdown' ); |
| 113 | + $blockReasonList = ''; |
| 114 | + if ( $scBlockReasonList != '' && $scBlockReasonList != '-' ) { |
| 115 | + $blockReasonList = "<option value=\"other\">$mIpbreasonotherlist</option>"; |
| 116 | + $optgroup = ""; |
| 117 | + foreach ( explode( "\n", $scBlockReasonList ) as $option) { |
| 118 | + $value = trim( htmlspecialchars($option) ); |
| 119 | + if ( $value == '' ) { |
| 120 | + continue; |
| 121 | + } elseif ( substr( $value, 0, 1) == '*' && substr( $value, 1, 1) != '*' ) { |
| 122 | + // A new group is starting ... |
| 123 | + $value = trim( substr( $value, 1 ) ); |
| 124 | + $blockReasonList .= "$optgroup<optgroup label=\"$value\">"; |
| 125 | + $optgroup = "</optgroup>"; |
| 126 | + } elseif ( substr( $value, 0, 2) == '**' ) { |
| 127 | + // groupmember |
| 128 | + $selected = ""; |
| 129 | + $value = trim( substr( $value, 2 ) ); |
| 130 | + if ( $this->BlockReasonList === $value) |
| 131 | + $selected = ' selected="selected"'; |
| 132 | + $blockReasonList .= "<option value=\"$value\"$selected>$value</option>"; |
| 133 | + } else { |
| 134 | + // groupless block reason |
| 135 | + $selected = ""; |
| 136 | + if ( $this->BlockReasonList === $value) |
| 137 | + $selected = ' selected="selected"'; |
| 138 | + $blockReasonList .= "$optgroup<option value=\"$value\"$selected>$value</option>"; |
| 139 | + $optgroup = ""; |
| 140 | + } |
| 141 | + } |
| 142 | + $blockReasonList .= $optgroup; |
| 143 | + } |
| 144 | + |
108 | 145 | $token = htmlspecialchars( $wgUser->editToken() ); |
109 | 146 | |
110 | 147 | global $wgStylePath, $wgStyleVersion; |
— | — | @@ -133,7 +170,6 @@ |
134 | 171 | </td> |
135 | 172 | "); |
136 | 173 | } |
137 | | - |
138 | 174 | $wgOut->addHTML(" |
139 | 175 | </tr> |
140 | 176 | <tr id='wpBlockOther'> |
— | — | @@ -142,12 +178,24 @@ |
143 | 179 | " . Xml::input( 'wpBlockOther', 45, $this->BlockOther, |
144 | 180 | array( 'tabindex' => '3', 'id' => 'mw-bi-other' ) ) . " |
145 | 181 | </td> |
146 | | - </tr> |
147 | | - <tr> |
| 182 | + </tr>"); |
| 183 | + if ( $blockReasonList != '' ) { |
| 184 | + $wgOut->addHTML(" |
| 185 | + <tr> |
| 186 | + <td align=\"right\">{$mIpbreasonother}:</td> |
| 187 | + <td align=\"left\"> |
| 188 | + <select tabindex='4' id=\"wpBlockReasonList\" name=\"wpBlockReasonList\"> |
| 189 | + $blockReasonList |
| 190 | + </select> |
| 191 | + </td> |
| 192 | + </tr>"); |
| 193 | + } |
| 194 | + $wgOut->addHTML(" |
| 195 | + <tr id=\"wpBlockReason\"> |
148 | 196 | <td align=\"right\">{$mIpbreason}:</td> |
149 | 197 | <td align=\"left\"> |
150 | 198 | " . Xml::input( 'wpBlockReason', 45, $this->BlockReason, |
151 | | - array( 'tabindex' => '3', 'id' => 'mw-bi-reason' ) ) . " |
| 199 | + array( 'tabindex' => '5', 'id' => 'mw-bi-reason' ) ) . " |
152 | 200 | </td> |
153 | 201 | </tr> |
154 | 202 | <tr id='wpAnonOnlyRow'> |
— | — | @@ -155,7 +203,7 @@ |
156 | 204 | <td align=\"left\"> |
157 | 205 | " . wfCheckLabel( wfMsgHtml( 'ipbanononly' ), |
158 | 206 | 'wpAnonOnly', 'wpAnonOnly', $this->BlockAnonOnly, |
159 | | - array( 'tabindex' => '4' ) ) . " |
| 207 | + array( 'tabindex' => '6' ) ) . " |
160 | 208 | </td> |
161 | 209 | </tr> |
162 | 210 | <tr id='wpCreateAccountRow'> |
— | — | @@ -163,7 +211,7 @@ |
164 | 212 | <td align=\"left\"> |
165 | 213 | " . wfCheckLabel( wfMsgHtml( 'ipbcreateaccount' ), |
166 | 214 | 'wpCreateAccount', 'wpCreateAccount', $this->BlockCreateAccount, |
167 | | - array( 'tabindex' => '5' ) ) . " |
| 215 | + array( 'tabindex' => '7' ) ) . " |
168 | 216 | </td> |
169 | 217 | </tr> |
170 | 218 | <tr id='wpEnableAutoblockRow'> |
— | — | @@ -171,7 +219,7 @@ |
172 | 220 | <td align=\"left\"> |
173 | 221 | " . wfCheckLabel( wfMsgHtml( 'ipbenableautoblock' ), |
174 | 222 | 'wpEnableAutoblock', 'wpEnableAutoblock', $this->BlockEnableAutoblock, |
175 | | - array( 'tabindex' => '6' ) ) . " |
| 223 | + array( 'tabindex' => '8' ) ) . " |
176 | 224 | </td> |
177 | 225 | </tr> |
178 | 226 | "); |
— | — | @@ -183,7 +231,7 @@ |
184 | 232 | <td align=\"left\"> |
185 | 233 | " . wfCheckLabel( wfMsgHtml( 'ipbhidename' ), |
186 | 234 | 'wpHideName', 'wpHideName', $this->BlockHideName, |
187 | | - array( 'tabindex' => '6' ) ) . " |
| 235 | + array( 'tabindex' => '9' ) ) . " |
188 | 236 | </td> |
189 | 237 | </tr> |
190 | 238 | "); |
— | — | @@ -193,7 +241,7 @@ |
194 | 242 | <td style='padding-top: 1em'> </td> |
195 | 243 | <td style='padding-top: 1em' align=\"left\"> |
196 | 244 | " . Xml::submitButton( wfMsgHtml( 'ipbsubmit' ), |
197 | | - array( 'name' => 'wpBlock', 'tabindex' => '7' ) ) . " |
| 245 | + array( 'name' => 'wpBlock', 'tabindex' => '10' ) ) . " |
198 | 246 | </td> |
199 | 247 | </tr> |
200 | 248 | </table>" . |
— | — | @@ -273,6 +321,14 @@ |
274 | 322 | } |
275 | 323 | } |
276 | 324 | |
| 325 | + $reasonstr = $this->BlockReasonList; |
| 326 | + if ( $reasonstr != 'other' && $this->BlockReason != '') { |
| 327 | + // Entry from drop down menu + additional comment |
| 328 | + $reasonstr .= ': ' . $this->BlockReason; |
| 329 | + } elseif ( $reasonstr == 'other' ) { |
| 330 | + $reasonstr = $this->BlockReason; |
| 331 | + } |
| 332 | + |
277 | 333 | $expirestr = $this->BlockExpiry; |
278 | 334 | if( $expirestr == 'other' ) |
279 | 335 | $expirestr = $this->BlockOther; |
— | — | @@ -300,7 +356,7 @@ |
301 | 357 | # Note: for a user block, ipb_address is only for display purposes |
302 | 358 | |
303 | 359 | $block = new Block( $this->BlockAddress, $userId, $wgUser->getID(), |
304 | | - $this->BlockReason, wfTimestampNow(), 0, $expiry, $this->BlockAnonOnly, |
| 360 | + $reasonstr, wfTimestampNow(), 0, $expiry, $this->BlockAnonOnly, |
305 | 361 | $this->BlockCreateAccount, $this->BlockEnableAutoblock, $this->BlockHideName); |
306 | 362 | |
307 | 363 | if (wfRunHooks('BlockIp', array(&$block, &$wgUser))) { |
— | — | @@ -322,7 +378,7 @@ |
323 | 379 | $log_type = ($this->BlockHideName) ? 'oversight' : 'block'; |
324 | 380 | $log = new LogPage( $log_type ); |
325 | 381 | $log->addEntry( 'block', Title::makeTitle( NS_USER, $this->BlockAddress ), |
326 | | - $this->BlockReason, $logParams ); |
| 382 | + $reasonstr, $logParams ); |
327 | 383 | |
328 | 384 | # Report to the user |
329 | 385 | $titleObj = SpecialPage::getTitleFor( 'Blockip' ); |
— | — | @@ -373,6 +429,7 @@ |
374 | 430 | private function getConvenienceLinks() { |
375 | 431 | global $wgUser; |
376 | 432 | $skin = $wgUser->getSkin(); |
| 433 | + $links[] = $skin->makeLink ( 'MediaWiki:ipbreason-dropdown', wfMsgHtml( 'ipb-edit-dropdown' ) ); |
377 | 434 | $links[] = $this->getUnblockLink( $skin ); |
378 | 435 | $links[] = $this->getBlockListLink( $skin ); |
379 | 436 | return '<p class="mw-ipb-conveniencelinks">' . implode( ' | ', $links ) . '</p>'; |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1946,6 +1946,23 @@ |
1947 | 1947 | 'ipadressorusername' => 'IP Address or username', |
1948 | 1948 | 'ipbexpiry' => 'Expiry', |
1949 | 1949 | 'ipbreason' => 'Reason', |
| 1950 | +'ipbreasonotherlist' => 'Other reason', |
| 1951 | + |
| 1952 | +// These are examples only. They can be translated but should be adjusted via |
| 1953 | +// [[MediaWiki:ipbreason-list]] by the local community |
| 1954 | +// defines a block reason not part of a group |
| 1955 | +// * defines a block reason group in the drow down menu |
| 1956 | +// ** defines a block reason |
| 1957 | +// To disable this drop down menu enter '-' in [[MediaWiki:ipbreason-dropdown]]. |
| 1958 | +'ipbreason-dropdown' => ' |
| 1959 | +*Common block reasons |
| 1960 | +** Inserting false information |
| 1961 | +** Removing content from pages |
| 1962 | +** Spamming links to external sites |
| 1963 | +** Inserting nonsense/gibberish into pages |
| 1964 | +** Intimidating behaviour/harassment |
| 1965 | +** Abusing multiple accounts |
| 1966 | +** Unacceptable username', |
1950 | 1967 | 'ipbanononly' => 'Block anonymous users only', |
1951 | 1968 | 'ipbcreateaccount' => 'Prevent account creation', |
1952 | 1969 | 'ipbenableautoblock' => 'Automatically block the last IP address used by this user, and any subsequent IPs they try to edit from', |
— | — | @@ -1953,11 +1970,13 @@ |
1954 | 1971 | 'ipbother' => 'Other time', |
1955 | 1972 | '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', |
1956 | 1973 | 'ipbotheroption' => 'other', |
| 1974 | +'ipbotherreason' => 'Other/additional reason', |
1957 | 1975 | 'ipbhidename' => 'Hide username/IP from the block log, active block list and user list', |
1958 | 1976 | 'badipaddress' => 'Invalid IP address', |
1959 | 1977 | 'blockipsuccesssub' => 'Block succeeded', |
1960 | 1978 | 'blockipsuccesstext' => '[[Special:Contributions/$1|$1]] has been blocked. |
1961 | 1979 | <br />See [[Special:Ipblocklist|IP block list]] to review blocks.', |
| 1980 | +'ipb-edit-dropdown' => 'Edit block reasons', |
1962 | 1981 | 'ipb-unblock-addr' => 'Unblock $1', |
1963 | 1982 | 'ipb-unblock' => 'Unblock a username or IP address', |
1964 | 1983 | 'ipb-blocklist-addr' => 'View existing blocks for $1', |
— | — | @@ -1980,7 +1999,7 @@ |
1981 | 2000 | 'blocklink' => 'block', |
1982 | 2001 | 'unblocklink' => 'unblock', |
1983 | 2002 | 'contribslink' => 'contribs', |
1984 | | -'autoblocker' => 'Autoblocked because your IP address has been recently used by "[[User:$1|$1]]". The reason given for $1\'s block is: "\'\'\'$2\'\'\'"', |
| 2003 | +'autoblocker' => 'Autoblocked because your IP address has been recently used by "[[User:$1|$1]]". The reason given for $1\'s block is: "$2"', |
1985 | 2004 | 'blocklogpage' => 'Block log', |
1986 | 2005 | 'blocklogentry' => 'blocked "[[$1]]" with an expiry time of $2 $3', |
1987 | 2006 | 'blocklogtext' => 'This is a log of user blocking and unblocking actions. Automatically |
Index: trunk/phase3/languages/messages/MessagesDe.php |
— | — | @@ -1510,6 +1510,18 @@ |
1511 | 1511 | 'ipadressorusername' => 'IP-Adresse oder Benutzername', |
1512 | 1512 | 'ipbexpiry' => 'Sperrdauer', |
1513 | 1513 | 'ipbreason' => 'Begründung', |
| 1514 | +'ipbreasonotherlist' => 'Andere Begründung', |
| 1515 | +'ipbreason-dropdown' => ' |
| 1516 | +* Allgemeine Sperrgründe |
| 1517 | +** Löschen von Seiten |
| 1518 | +** Einstellen unsinniger Seiten |
| 1519 | +** Fortgesetzte Verstöße gegen die Richtlinien für Weblinks |
| 1520 | +** Verstoß gegen den Grundsatz „Keine persönlichen Angriffe“ |
| 1521 | +* Benutzerspezifische Sperrgründe |
| 1522 | +** Ungeeigneter Benutzername |
| 1523 | +** Neuanmeldung eines unbeschränkt gesperrten Benutzers |
| 1524 | +* IP-spezifische Sperrgründe |
| 1525 | +** Proxy, wegen Vandalismus einzelner Benutzer längerfristig gesperrt', |
1514 | 1526 | 'ipbanononly' => 'Nur anonyme Benutzer sperren', |
1515 | 1527 | 'ipbcreateaccount' => 'Erstellung von Benutzerkonten verhindern', |
1516 | 1528 | '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', |
— | — | @@ -1517,12 +1529,14 @@ |
1518 | 1530 | 'ipbother' => 'Andere Dauer (englisch)', |
1519 | 1531 | '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', |
1520 | 1532 | 'ipbotheroption' => 'Andere Dauer', |
| 1533 | +'ipbotherreason' => 'Andere/ergänzende Begründung', |
1521 | 1534 | 'ipbhidename' => 'Benutzername/IP-Adresse im Sperr-Logbuch, der Liste aktiver Sperren und dem Benutzerverzeichnis verstecken.', |
1522 | 1535 | 'badipaddress' => 'Die IP-Adresse hat ein falsches Format.', |
1523 | 1536 | 'blockipsuccesssub' => 'Sperre erfolgreich', |
1524 | 1537 | 'blockipsuccesstext' => 'Der Benutzer/die IP-Adresse [[{{ns:special}}:Contributions/$1|$1]] wurde gesperrt und die Aktion im [[{{ns:special}}:Log/block|Benutzersperr-Logbuch]] protokolliert |
1525 | 1538 | |
1526 | 1539 | Zur Aufhebung der Sperre siehe die [[{{ns:special}}:Ipblocklist|Liste aller aktiven Sperren]].', |
| 1540 | +'ipb-edit-dropdown' => 'Sperrgründe bearbeiten', |
1527 | 1541 | 'ipb-unblock-addr' => '„$1“ freigeben', |
1528 | 1542 | 'ipb-unblock' => 'IP-Adresse/Benutzer freigeben', |
1529 | 1543 | 'ipb-blocklist-addr' => 'Aktuelle Sperre für „$1“ anzeigen', |
— | — | @@ -1551,7 +1565,7 @@ |
1552 | 1566 | 'unblocklogentry' => 'hat die Sperre von [[$1]] aufgehoben.', |
1553 | 1567 | 'block-log-flags-anononly' => 'nur Anonyme', |
1554 | 1568 | 'block-log-flags-nocreate' => 'Erstellung von Benutzerkonten gesperrt', |
1555 | | -'block-log-flags-autoblock' => 'Autoblock aktiviert', |
| 1569 | +'block-log-flags-noautoblock' => 'Autoblock deaktiviert', |
1556 | 1570 | 'range_block_disabled' => 'Die Möglichkeit, ganze Adressräume zu sperren, ist nicht aktiviert.', |
1557 | 1571 | 'ipb_expiry_invalid' => 'Die eingegebene Dauer ist ungültig.', |
1558 | 1572 | 'ipb_already_blocked' => '„$1“ wurde bereits gesperrt', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -122,8 +122,8 @@ |
123 | 123 | * Added sharpening option for ImageMagick thumbnailing |
124 | 124 | * (bug 9656) Autosummaries will be generated for deletion of pages longer than |
125 | 125 | 500 characters |
| 126 | +* Predefined block reasons added to Special:Blockip |
126 | 127 | |
127 | | - |
128 | 128 | == Bugfixes since 1.9 == |
129 | 129 | |
130 | 130 | * (bug 7292) Fix site statistics when moving pages in/out of content namespaces |