From: David McCabe Date: Tue, 6 Nov 2007 04:17:36 +0000 (+0000) Subject: Moved the bailout for empty watchlists to after the BeforeWatchlist hook so that... X-Git-Tag: 1.31.0-rc.0~50984 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=282b1728612eb67d3c4f0c47c0617b3c28df96c6;p=lhc%2Fweb%2Fwiklou.git Moved the bailout for empty watchlists to after the BeforeWatchlist hook so that the hook can still insert content into an empty watchlist page. --- 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 = '';