summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialBlockList.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-01-12 13:42:29 +0100
committerPierre Schmitz <pierre@archlinux.de>2012-01-12 13:42:29 +0100
commitba0fc4fa20067528effd4802e53ceeb959640825 (patch)
tree4f62217349d3afa39dbba3f7e19dac0aecb344f6 /includes/specials/SpecialBlockList.php
parentca32f08966f1b51fcb19460f0996bb0c4048e6fe (diff)
Update to MediaWiki 1.18.1
Diffstat (limited to 'includes/specials/SpecialBlockList.php')
-rw-r--r--includes/specials/SpecialBlockList.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php
index ebeb5874..04787a65 100644
--- a/includes/specials/SpecialBlockList.php
+++ b/includes/specials/SpecialBlockList.php
@@ -426,7 +426,11 @@ class HTMLBlockedUsersItemSelect extends HTMLSelectField {
return true;
}
- if ( !in_array( $value, $this->mParams['options'] ) ) {
+ // Let folks pick an explicit limit not from our list, as long as it's a real numbr.
+ if ( !in_array( $value, $this->mParams['options'] ) && $value == intval( $value ) && $value > 0 ) {
+ // This adds the explicitly requested limit value to the drop-down,
+ // then makes sure it's sorted correctly so when we output the list
+ // later, the custom option doesn't just show up last.
$this->mParams['options'][ $this->mParent->getLanguage()->formatNum( $value ) ] = intval($value);
asort( $this->mParams['options'] );
}