r53801 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53800‎ | r53801 | r53802 >
Date:10:45, 27 July 2009
Author:werdna
Status:ok
Tags:
Comment:
Fix for bug 19887, make sure tagfilter form option is "consumed" (whatever that means), prevents old value from being propagated through the form.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialNewpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchangeslinked.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php
@@ -168,7 +168,7 @@
169169 }
170170
171171 function getExtraOptions( $opts ){
172 - $opts->consumeValues( array( 'showlinkedto', 'target' ) );
 172+ $opts->consumeValues( array( 'showlinkedto', 'target', 'tagfilter' ) );
173173 $extraOpts = array();
174174 $extraOpts['namespace'] = $this->namespaceFilterForm( $opts );
175175 $extraOpts['target'] = array( wfMsgHtml( 'recentchangeslinked-page' ),
Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -165,6 +165,7 @@
166166 $this->opts->consumeValue( 'offset' ); // don't carry offset, DWIW
167167 $namespace = $this->opts->consumeValue( 'namespace' );
168168 $username = $this->opts->consumeValue( 'username' );
 169+ $tagFilterVal = $this->opts->consumeValue( 'tagfilter' );
169170
170171 // Check username input validity
171172 $ut = Title::makeTitleSafe( NS_USER, $username );
@@ -177,7 +178,7 @@
178179 }
179180 $hidden = implode( "\n", $hidden );
180181
181 - $tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );
 182+ $tagFilter = ChangeTags::buildTagFilterSelector( $tagFilterVal );
182183 if ($tagFilter)
183184 list( $tagFilterLabel, $tagFilterSelector ) = $tagFilter;
184185
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -414,7 +414,7 @@
415415
416416 $defaults = $opts->getAllValues();
417417 $nondefaults = $opts->getChangedValues();
418 - $opts->consumeValues( array( 'namespace', 'invert' ) );
 418+ $opts->consumeValues( array( 'namespace', 'invert', 'tagfilter' ) );
419419
420420 $panel = array();
421421 $panel[] = $this->optionsPanel( $defaults, $nondefaults );

Status & tagging log