Moved the bailout for empty watchlists to after the BeforeWatchlist hook so that...
authorDavid McCabe <david@users.mediawiki.org>
Tue, 6 Nov 2007 04:17:36 +0000 (04:17 +0000)
committerDavid McCabe <david@users.mediawiki.org>
Tue, 6 Nov 2007 04:17:36 +0000 (04:17 +0000)
includes/SpecialWatchlist.php

index 546a8a4..1518e44 100644 (file)
@@ -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 = '';