r105853 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105852‎ | r105853 | r105854 >
Date:06:27, 12 December 2011
Author:brion
Status:resolved (Comments)
Tags:
Comment:
* (bug 32958) SpecialAllMessages: input form doesn't show and remember filter option

Did this a little differently, but inspired by MrBlueSky's patch: https://bugzilla.wikimedia.org/attachment.cgi?id=9655

Rather than using the $this->custom values to check as in the patch, I moved $this->filter from the specialpage class (where it wasn't being used) to the pager class (where it was being used). Probably left over from a refactor.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialAllmessages.php (modified) (history)

Diff [purge]

Index: trunk/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(),
@@ -120,7 +117,8 @@
121118
122119 $request = $this->getRequest();
123120
124 - if( $request->getVal( 'filter', 'all' ) === 'all' ){
 121+ $this->filter = $request->getVal( 'filter', 'all' );
 122+ if( $this->filter === 'all' ){
125123 $this->custom = null; // So won't match in either case
126124 } else {
127125 $this->custom = ($request->getVal( 'filter' ) == 'unmodified');

Follow-up revisions

RevisionCommit summaryAuthorDate
r105897Followup r105853 -- another instance of $request->getVal('filter', 'all') to ...brion15:51, 12 December 2011
r107926MFT r105341, r105853, r105897reedy19:26, 3 January 2012
r107975MFT r105341, t105853, r106780reedy00:40, 4 January 2012

Comments

#Comment by 😂 (talk | contribs)   13:37, 12 December 2011

Could you reuse $this->filter below on $this->custom?

#Comment by Brion VIBBER (talk | contribs)   15:49, 12 December 2011

Poop, I caught the first one but not the second.

#Comment by Brion VIBBER (talk | contribs)   15:51, 12 December 2011

Status & tagging log