* (bug 32958) SpecialAllMessages: input form doesn't show and remember filter option
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 12 Dec 2011 06:27:20 +0000 (06:27 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 12 Dec 2011 06:27:20 +0000 (06:27 +0000)
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.

includes/specials/SpecialAllmessages.php

index 45ba406..4f2b84d 100644 (file)
@@ -62,9 +62,6 @@ class SpecialAllmessages extends SpecialPage {
 
                $out->addModuleStyles( 'mediawiki.special' );
 
-               $this->filter = $request->getVal( 'filter', 'all' );
-               $this->prefix = $request->getVal( 'prefix', '' );
-
                $this->table = new AllmessagesTablePager(
                        $this,
                        array(),
@@ -120,7 +117,8 @@ class AllmessagesTablePager extends TablePager {
 
                $request = $this->getRequest();
 
-               if( $request->getVal( 'filter', 'all' ) === 'all' ){
+               $this->filter = $request->getVal( 'filter', 'all' );
+               if( $this->filter === 'all' ){
                        $this->custom = null; // So won't match in either case
                } else {
                        $this->custom = ($request->getVal( 'filter' ) == 'unmodified');