r100775 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100774‎ | r100775 | r100776 >
Date:02:56, 26 October 2011
Author:mah
Status:ok (Comments)
Tags:
Comment:
Bug 31948 - Special:Contributions doesn't remember tagfilter in
options form

Patch from MrBlueSky.
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/CREDITS
@@ -131,6 +131,7 @@
132132 * Michael Walsh
133133 * Mike Horvath
134134 * Mormegil
 135+* MrBlueSky
135136 * MrPete
136137 * MZMcBride
137138 * mybugs.mail
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -100,7 +100,7 @@
101101 $this->opts['namespace'] = '';
102102 }
103103
104 - $this->opts['tagFilter'] = (string) $request->getVal( 'tagFilter' );
 104+ $this->opts['tagfilter'] = (string) $request->getVal( 'tagfilter' );
105105
106106 // Allows reverts to have the bot flag in recent changes. It is just here to
107107 // be passed in the form at the top of the page
@@ -133,8 +133,8 @@
134134 if ( $this->opts['deletedOnly'] ) {
135135 $apiParams['deletedonly'] = true;
136136 }
137 - if ( $this->opts['tagFilter'] !== '' ) {
138 - $apiParams['tagfilter'] = $this->opts['tagFilter'];
 137+ if ( $this->opts['tagfilter'] !== '' ) {
 138+ $apiParams['tagfilter'] = $this->opts['tagfilter'];
139139 }
140140 if ( $this->opts['namespace'] !== '' ) {
141141 $apiParams['namespace'] = $this->opts['namespace'];
@@ -369,8 +369,8 @@
370370 $this->opts['target'] = '';
371371 }
372372
373 - if( !isset( $this->opts['tagFilter'] ) ) {
374 - $this->opts['tagFilter'] = '';
 373+ if( !isset( $this->opts['tagfilter'] ) ) {
 374+ $this->opts['tagfilter'] = '';
375375 }
376376
377377 if( !isset( $this->opts['topOnly'] ) ) {
@@ -388,7 +388,7 @@
389389 $f .= "\t" . Html::hidden( $name, $value ) . "\n";
390390 }
391391
392 - $tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagFilter'] );
 392+ $tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );
393393
394394 $f .= Xml::fieldset( wfMsg( 'sp-contributions-search' ) ) .
395395 Xml::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ),
@@ -444,7 +444,7 @@
445445 $this->target = isset( $options['target'] ) ? $options['target'] : '';
446446 $this->contribs = isset( $options['contribs'] ) ? $options['contribs'] : 'users';
447447 $this->namespace = isset( $options['namespace'] ) ? $options['namespace'] : '';
448 - $this->tagFilter = isset( $options['tagFilter'] ) ? $options['tagFilter'] : false;
 448+ $this->tagFilter = isset( $options['tagfilter'] ) ? $options['tagfilter'] : false;
449449
450450 $this->deletedOnly = !empty( $options['deletedOnly'] );
451451 $this->topOnly = !empty( $options['topOnly'] );

Comments

#Comment by Aaron Schulz (talk | contribs)   20:31, 26 October 2011

I get the '$request->getVal( 'tagfilter' )' change, but why change the options variable keyname...that shouldn't matter.

#Comment by MarkAHershberger (talk | contribs)   01:49, 27 October 2011

agreed, but I tested this and didn't have more time to spend on it. Still if you think the keyname should be changed back...

Status & tagging log