Merge "Update set of files cleaned up after parserTests"
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index 4c3f17b..dd9f262 100644 (file)
@@ -28,9 +28,6 @@
  * @ingroup SpecialPage
  */
 class SpecialWatchlist extends ChangesListSpecialPage {
-       /**
-        * Constructor
-        */
        public function __construct( $page = 'Watchlist', $restriction = 'viewmywatchlist' ) {
                parent::__construct( $page, $restriction );
        }
@@ -58,6 +55,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                        }
 
                        $output->redirect( $title->getLocalURL() );
+
                        return;
                }
 
@@ -66,11 +64,13 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                $user = $this->getUser();
                $opts = $this->getOptions();
 
-               if ( ( $wgEnotifWatchlist || $wgShowUpdatedMarker ) && $request->getVal( 'reset' ) &&
-                       $request->wasPosted() )
-               {
+               if ( ( $wgEnotifWatchlist || $wgShowUpdatedMarker )
+                       && $request->getVal( 'reset' )
+                       && $request->wasPosted()
+               ) {
                        $user->clearAllNotifications();
                        $output->redirect( $this->getPageTitle()->getFullURL( $opts->getChangedValues() ) );
+
                        return;
                }
 
@@ -145,6 +145,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                // methods defined on WebRequest and removing this dependency would cause some code duplication.
                $request = new DerivativeRequest( $this->getRequest(), $params );
                $opts->fetchValuesFromRequest( $request );
+
                return $opts;
        }
 
@@ -160,7 +161,8 @@ class SpecialWatchlist extends ChangesListSpecialPage {
 
                // Calculate cutoff
                if ( $opts['days'] > 0 ) {
-                       $conds[] = 'rc_timestamp > ' . $dbr->addQuotes( $dbr->timestamp( time() - intval( $opts['days'] * 86400 ) ) );
+                       $conds[] = 'rc_timestamp > ' .
+                               $dbr->addQuotes( $dbr->timestamp( time() - intval( $opts['days'] * 86400 ) ) );
                }
 
                return $conds;
@@ -379,7 +381,8 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                if ( $opts['days'] > 0 ) {
                        $timestamp = wfTimestampNow();
                        $wlInfo = $this->msg( 'wlnote2' )->numParams( round( $opts['days'] * 24 ) )->params(
-                               $lang->userDate( $timestamp, $user ), $lang->userTime( $timestamp, $user ) )->parse() . "<br />\n";
+                               $lang->userDate( $timestamp, $user ), $lang->userTime( $timestamp, $user )
+                       )->parse() . "<br />\n";
                }
 
                $nondefaults = $opts->getChangedValues();
@@ -513,7 +516,9 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                $label = $this->msg( $value ? 'show' : 'hide' )->escaped();
                $options[$name] = 1 - (int)$value;
 
-               return $this->msg( $message )->rawParams( Linker::linkKnown( $this->getPageTitle(), $label, array(), $options ) )->escaped();
+               return $this->msg( $message )
+                       ->rawParams( Linker::linkKnown( $this->getPageTitle(), $label, array(), $options ) )
+                       ->escaped();
        }
 
        protected function hoursLink( $h, $options = array() ) {
@@ -529,7 +534,8 @@ class SpecialWatchlist extends ChangesListSpecialPage {
 
        protected function daysLink( $d, $options = array() ) {
                $options['days'] = $d;
-               $message = ( $d ? $this->getLanguage()->formatNum( $d ) : $this->msg( 'watchlistall2' )->escaped() );
+               $message = $d ? $this->getLanguage()->formatNum( $d )
+                       : $this->msg( 'watchlistall2' )->escaped();
 
                return Linker::linkKnown(
                        $this->getPageTitle(),
@@ -557,6 +563,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                foreach ( $days as $d ) {
                        $days[$i++] = $this->daysLink( $d, $options );
                }
+
                return $this->msg( 'wlshowlast' )->rawParams(
                        $this->getLanguage()->pipeList( $hours ),
                        $this->getLanguage()->pipeList( $days ),