From 282b1728612eb67d3c4f0c47c0617b3c28df96c6 Mon Sep 17 00:00:00 2001 From: David McCabe Date: Tue, 6 Nov 2007 04:17:36 +0000 Subject: [PATCH] Moved the bailout for empty watchlists to after the BeforeWatchlist hook so that the hook can still insert content into an empty watchlist page. --- includes/SpecialWatchlist.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/SpecialWatchlist.php b/includes/SpecialWatchlist.php index 546a8a4d23..1518e4441f 100644 --- a/includes/SpecialWatchlist.php +++ b/includes/SpecialWatchlist.php @@ -96,11 +96,6 @@ function wfSpecialWatchlist( $par ) { $nitems = floor($s->n / 2); # $nitems = $s->n; - if($nitems == 0) { - $wgOut->addWikiText( wfMsg( 'nowatchlist' ) ); - return; - } - if( is_null($days) || !is_numeric($days) ) { $big = 1000; /* The magical big */ if($nitems > $big) { @@ -126,6 +121,11 @@ function wfSpecialWatchlist( $par ) { if( ! wfRunHooks('BeforeWatchlist', array($nondefaults, $wgUser, &$hookSql)) ) { return; } + + if($nitems == 0) { + $wgOut->addWikiText( wfMsg( 'nowatchlist' ) ); + return; + } if ( $days <= 0 ) { $andcutoff = ''; -- 2.20.1