Don't use getCheck, because the opts array is reused to generate the query for the...
authorDerk-Jan Hartman <hartman@users.mediawiki.org>
Sat, 19 Feb 2011 21:03:52 +0000 (21:03 +0000)
committerDerk-Jan Hartman <hartman@users.mediawiki.org>
Sat, 19 Feb 2011 21:03:52 +0000 (21:03 +0000)
getCheck checks for presence, not for true/false, so that was why rss feeds behaved as if
deletedOnly was set.

Follow up to r65651
Fixes bug #27546

includes/specials/SpecialContributions.php

index 10dbb94..cfe2e01 100644 (file)
@@ -58,7 +58,7 @@ class SpecialContributions extends SpecialPage {
                        $this->opts['contribs'] = 'newbie';
                }
 
-               $this->opts['deletedOnly'] = $wgRequest->getCheck( 'deletedOnly' );
+               $this->opts['deletedOnly'] = $wgRequest->getBool( 'deletedOnly' );
 
                if( !strlen( $target ) ) {
                        $wgOut->addHTML( $this->getForm() );
@@ -67,7 +67,7 @@ class SpecialContributions extends SpecialPage {
 
                $this->opts['limit'] = $wgRequest->getInt( 'limit', $wgUser->getOption('rclimit') );
                $this->opts['target'] = $target;
-               $this->opts['topOnly'] = $wgRequest->getCheck( 'topOnly' );
+               $this->opts['topOnly'] = $wgRequest->getBool( 'topOnly' );
 
                $nt = Title::makeTitleSafe( NS_USER, $target );
                if( !$nt ) {