r107926 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107925‎ | r107926 | r107927 >
Date:19:26, 3 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_18/phase3 (modified) (history)
  • /branches/REL1_18/phase3/includes (modified) (history)
  • /branches/REL1_18/phase3/includes/specials (modified) (history)
  • /branches/REL1_18/phase3/includes/specials/SpecialAllmessages.php (modified) (history)
  • /branches/REL1_18/phase3/includes/specials/SpecialBlockList.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/includes/specials/SpecialAllmessages.php
@@ -62,9 +62,6 @@
6363
6464 $out->addModuleStyles( 'mediawiki.special' );
6565
66 - $this->filter = $request->getVal( 'filter', 'all' );
67 - $this->prefix = $request->getVal( 'prefix', '' );
68 -
6966 $this->table = new AllmessagesTablePager(
7067 $this,
7168 array(),
@@ -118,10 +115,13 @@
119116 $this->langcode = $this->lang->getCode();
120117 $this->foreign = $this->langcode != $wgContLang->getCode();
121118
122 - if( $wgRequest->getVal( 'filter', 'all' ) === 'all' ){
 119+ $request = $this->getRequest();
 120+
 121+ $this->filter = $request->getVal( 'filter', 'all' );
 122+ if( $this->filter === 'all' ){
123123 $this->custom = null; // So won't match in either case
124124 } else {
125 - $this->custom = ($wgRequest->getVal( 'filter' ) == 'unmodified');
 125+ $this->custom = ($this->filter == 'unmodified');
126126 }
127127
128128 $prefix = $wgLang->ucfirst( $wgRequest->getVal( 'prefix', '' ) );
Index: branches/REL1_18/phase3/includes/specials/SpecialBlockList.php
@@ -426,7 +426,11 @@
427427 return true;
428428 }
429429
430 - if ( !in_array( $value, $this->mParams['options'] ) ) {
 430+ // Let folks pick an explicit limit not from our list, as long as it's a real numbr.
 431+ if ( !in_array( $value, $this->mParams['options'] ) && $value == intval( $value ) && $value > 0 ) {
 432+ // This adds the explicitly requested limit value to the drop-down,
 433+ // then makes sure it's sorted correctly so when we output the list
 434+ // later, the custom option doesn't just show up last.
431435 $this->mParams['options'][ $this->mParent->getLanguage()->formatNum( $value ) ] = intval($value);
432436 asort( $this->mParams['options'] );
433437 }
Property changes on: branches/REL1_18/phase3/includes/specials
___________________________________________________________________
Modified: svn:mergeinfo
434438 Merged /trunk/phase3/includes/specials:r105341,105853,105897
Property changes on: branches/REL1_18/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
435439 Merged /trunk/phase3/includes:r105341,105853,105897
Property changes on: branches/REL1_18/phase3
___________________________________________________________________
Modified: svn:mergeinfo
436440 Merged /trunk/phase3:r105341,105853,105897

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105341Followup r104350, r104318: only allow custom limits through if they're valid ...brion19:45, 6 December 2011
r105853* (bug 32958) SpecialAllMessages: input form doesn't show and remember filter...brion06:27, 12 December 2011
r105897Followup r105853 -- another instance of $request->getVal('filter', 'all') to ...brion15:51, 12 December 2011

Status & tagging log