SpecialContributions: Simplify check for 'Special:Contributions/newbies'
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 23 Dec 2015 21:17:06 +0000 (22:17 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Wed, 23 Dec 2015 21:17:06 +0000 (22:17 +0100)
Added in 54615b5ea1a05caf40461b46193b4779e912f528 (per T36659)
as a possibly temporary workaround, it has stuck around for six
release versions now. It's not going to suddenly disappear
and we shouldn't optimize this code for ease of removal :)

Bug: T36659
Change-Id: I946ae7cf164f5c71b2ea4023161df7452bd1745a

includes/specials/SpecialContributions.php

index fc9f750..bf3ab90 100644 (file)
@@ -49,11 +49,7 @@ class SpecialContributions extends IncludableSpecialPage {
                        $target = $request->getVal( 'target' );
                }
 
-               // check for radiobox
-               if ( $request->getVal( 'contribs' ) == 'newbie' ) {
-                       $target = 'newbies';
-                       $this->opts['contribs'] = 'newbie';
-               } elseif ( $par === 'newbies' ) { // b/c for WMF
+               if ( $request->getVal( 'contribs' ) == 'newbie' || $par === 'newbies' ) {
                        $target = 'newbies';
                        $this->opts['contribs'] = 'newbie';
                } else {