X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWatchlist.php;h=dd9f2624df9b793106199446f904de224f7a23c4;hb=171313e2ab337fcdfa5d366784192a96bc55d007;hp=4c3f17bb98eaacc3b0fd4ea5d34e6f36c967823e;hpb=b64bc4e9693ec3e676dadc766f75030d8b11a43b;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php
index 4c3f17bb98..dd9f2624df 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -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() . "
\n";
+ $lang->userDate( $timestamp, $user ), $lang->userTime( $timestamp, $user )
+ )->parse() . "
\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 ),