From: Aaron Schulz Date: Fri, 2 Jan 2009 21:31:04 +0000 (+0000) Subject: (bug 16433) Special:UnwatchedPages should list unwatched pages in the content namespa... X-Git-Tag: 1.31.0-rc.0~43603 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=072423bf279d435dd18796c8539c8372f41c9df6;p=lhc%2Fweb%2Fwiklou.git (bug 16433) Special:UnwatchedPages should list unwatched pages in the content namespace(s) --- diff --git a/includes/specials/SpecialUnwatchedpages.php b/includes/specials/SpecialUnwatchedpages.php index 64ab372995..3a586f7966 100644 --- a/includes/specials/SpecialUnwatchedpages.php +++ b/includes/specials/SpecialUnwatchedpages.php @@ -20,9 +20,11 @@ class UnwatchedpagesPage extends QueryPage { function isSyndicated() { return false; } function getSQL() { + global $wgContentNamespaces; $dbr = wfGetDB( DB_SLAVE ); list( $page, $watchlist ) = $dbr->tableNamesN( 'page', 'watchlist' ); - $mwns = NS_MEDIAWIKI; + $content = implode(',',$wgContentNamespaces); + $content = $content ? $content : NS_MAIN; return " SELECT @@ -32,7 +34,7 @@ class UnwatchedpagesPage extends QueryPage { page_namespace as value FROM $page LEFT JOIN $watchlist ON wl_namespace = page_namespace AND page_title = wl_title - WHERE wl_title IS NULL AND page_is_redirect = 0 AND page_namespace<>$mwns + WHERE wl_title IS NULL AND page_is_redirect = 0 AND page_namespace IN ($content) "; }