SpecialWatchlist: Minor cleanup
authorBartosz Dziewoński <matma.rex@gmail.com>
Sat, 9 Nov 2013 00:37:59 +0000 (01:37 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sat, 9 Nov 2013 00:43:39 +0000 (01:43 +0100)
* Prettier whitespacing
* Removed query building special-case already handled by makeList()

Change-Id: I45aa7bbbff1e21abd739825939fd5cd3d02fc7a4

includes/specials/SpecialWatchlist.php

index 336b05b..62c33a2 100644 (file)
@@ -60,15 +60,21 @@ class SpecialWatchlist extends SpecialPage {
                // Add feed links
                $wlToken = $user->getTokenFromOption( 'watchlisttoken' );
                if ( $wlToken ) {
-                       $this->addFeedLinks( array( 'action' => 'feedwatchlist', 'allrev' => 'allrev',
-                                                               'wlowner' => $user->getName(), 'wltoken' => $wlToken ) );
+                       $this->addFeedLinks( array(
+                               'action' => 'feedwatchlist',
+                               'allrev' => 1,
+                               'wlowner' => $user->getName(),
+                               'wltoken' => $wlToken,
+                       ) );
                }
 
                $this->setHeaders();
                $this->outputHeader();
 
-               $output->addSubtitle( $this->msg( 'watchlistfor2', $user->getName()
-                       )->rawParams( SpecialEditWatchlist::buildTools( null ) ) );
+               $output->addSubtitle(
+                       $this->msg( 'watchlistfor2', $user->getName() )
+                               ->rawParams( SpecialEditWatchlist::buildTools( null ) )
+               );
 
                $request = $this->getRequest();
 
@@ -205,10 +211,6 @@ class SpecialWatchlist extends SpecialPage {
                        $nonRevisionTypes = array( RC_LOG );
                        wfRunHooks( 'SpecialWatchlistGetNonRevisionTypes', array( &$nonRevisionTypes ) );
                        if ( $nonRevisionTypes ) {
-                               if ( count( $nonRevisionTypes ) === 1 ) {
-                                       // if only one use an equality instead of IN condition
-                                       $nonRevisionTypes = reset( $nonRevisionTypes );
-                               }
                                $conds[] = $dbr->makeList(
                                        array(
                                                'rc_this_oldid=page_latest',