Index: branches/wmf/1.18wmf1/includes/AutoLoader.php |
— | — | @@ -710,6 +710,7 @@ |
711 | 711 | 'EmailInvalidation' => 'includes/specials/SpecialConfirmemail.php', |
712 | 712 | 'FewestrevisionsPage' => 'includes/specials/SpecialFewestrevisions.php', |
713 | 713 | 'FileDuplicateSearchPage' => 'includes/specials/SpecialFileDuplicateSearch.php', |
| 714 | + 'HTMLBlockedUsersItemSelect' => 'includes/specials/SpecialBlockList.php', |
714 | 715 | 'ImportReporter' => 'includes/specials/SpecialImport.php', |
715 | 716 | 'IPBlockForm' => 'includes/specials/SpecialBlock.php', |
716 | 717 | 'LinkSearchPage' => 'includes/specials/SpecialLinkSearch.php', |
Property changes on: branches/wmf/1.18wmf1/includes/AutoLoader.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
717 | 718 | Merged /trunk/phase3/includes/AutoLoader.php:r104322,104350 |
Index: branches/wmf/1.18wmf1/includes/specials/SpecialBlockList.php |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | * @param $par String title fragment |
42 | 42 | */ |
43 | 43 | public function execute( $par ) { |
44 | | - global $wgOut, $wgRequest; |
| 44 | + global $wgOut, $wgRequest, $wgLang; |
45 | 45 | |
46 | 46 | $this->setHeaders(); |
47 | 47 | $this->outputHeader(); |
— | — | @@ -78,6 +78,19 @@ |
79 | 79 | ), |
80 | 80 | 'flatlist' => true, |
81 | 81 | ), |
| 82 | + 'Limit' => array( |
| 83 | + 'class' => 'HTMLBlockedUsersItemSelect', |
| 84 | + 'label-message' => 'table_pager_limit_label', |
| 85 | + 'options' => array( |
| 86 | + $wgLang->formatNum( 20 ) => 20, |
| 87 | + $wgLang->formatNum( 50 ) => 50, |
| 88 | + $wgLang->formatNum( 100 ) => 100, |
| 89 | + $wgLang->formatNum( 250 ) => 250, |
| 90 | + $wgLang->formatNum( 500 ) => 500, |
| 91 | + ), |
| 92 | + 'name' => 'limit', |
| 93 | + 'default' => 50, |
| 94 | + ), |
82 | 95 | ); |
83 | 96 | $form = new HTMLForm( $fields, $this->getContext() ); |
84 | 97 | $form->setMethod( 'get' ); |
— | — | @@ -394,3 +407,32 @@ |
395 | 408 | return $this->page->getTitle(); |
396 | 409 | } |
397 | 410 | } |
| 411 | + |
| 412 | +/** |
| 413 | + * Items per page dropdown. Essentially a crap workaround for bug 32603. |
| 414 | + * |
| 415 | + * @todo Do not release 1.19 with this. |
| 416 | + */ |
| 417 | +class HTMLBlockedUsersItemSelect extends HTMLSelectField { |
| 418 | + /** |
| 419 | + * Basically don't do any validation. If it's a number that's fine. Also, |
| 420 | + * add it to the list if it's not there already |
| 421 | + * |
| 422 | + * @param $value |
| 423 | + * @param $alldata |
| 424 | + * @return bool |
| 425 | + */ |
| 426 | + function validate( $value, $alldata ) { |
| 427 | + if ( $value == '' ) { |
| 428 | + return true; |
| 429 | + } |
| 430 | + |
| 431 | + if ( !in_array( $value, $this->mParams['options'] ) ) { |
| 432 | + $this->mParams['options'][ $this->mParent->getLanguage()->formatNum( $value ) ] = intval($value); |
| 433 | + asort( $this->mParams['options'] ); |
| 434 | + } |
| 435 | + |
| 436 | + return true; |
| 437 | + } |
| 438 | + |
| 439 | +} |
Property changes on: branches/wmf/1.18wmf1/includes/specials/SpecialBlockList.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
398 | 440 | Merged /trunk/phase3/includes/specials/SpecialBlockList.php:r104318,104322,104350 |
Property changes on: branches/wmf/1.18wmf1/includes/specials |
___________________________________________________________________ |
Modified: svn:mergeinfo |
399 | 441 | Merged /trunk/phase3/includes/specials:r104318,104322,104350 |
Property changes on: branches/wmf/1.18wmf1/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
400 | 442 | Merged /trunk/phase3/includes:r104318,104322,104350 |
Property changes on: branches/wmf/1.18wmf1 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
401 | 443 | Merged /trunk/phase3:r104318,104322,104350 |