Reverting r16861; incompatible change to message texts, breaks a lot of toggle displa...
[lhc/web/wiklou.git] / includes / SpecialUnwatchedpages.php
index d37ce07..66e5c09 100644 (file)
@@ -10,9 +10,6 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
  */
 
-/* */
-require_once 'QueryPage.php';
-
 /**
  * @package MediaWiki
  * @subpackage SpecialPage
@@ -26,6 +23,7 @@ class UnwatchedpagesPage extends QueryPage {
        function getSQL() {
                $dbr =& wfGetDB( DB_SLAVE );
                extract( $dbr->tableNames( 'page', 'watchlist' ) );
+               $mwns = NS_MEDIAWIKI;
                return
                        "
                        SELECT
@@ -35,10 +33,10 @@ 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
+                       WHERE wl_title IS NULL AND page_is_redirect = 0 AND page_namespace<>$mwns
                        ";
        }
-       
+
        function sortDescending() { return false; }
 
        function formatResult( $skin, $result ) {
@@ -46,11 +44,11 @@ class UnwatchedpagesPage extends QueryPage {
 
                $nt = Title::makeTitle( $result->namespace, $result->title );
                $text = $wgContLang->convert( $nt->getPrefixedText() );
-               
-               $plink = $skin->makeKnownLink( $nt->getPrefixedText(), htmlspecialchars( $text ) );
-               $wlink = $skin->makeKnownLinkObj( $nt, '(' . wfMsg( 'watch' ) . ')', 'action=watch' );
-               
-               return $plink . ' ' . $wlink;
+
+               $plink = $skin->makeKnownLinkObj( $nt, htmlspecialchars( $text ) );
+               $wlink = $skin->makeKnownLinkObj( $nt, wfMsgHtml( 'watch' ), 'action=watch' );
+
+               return wfSpecialList( $plink, $wlink );
        }
 }
 
@@ -59,10 +57,10 @@ class UnwatchedpagesPage extends QueryPage {
  */
 function wfSpecialUnwatchedpages() {
        global $wgUser, $wgOut;
-       
+
        if ( ! $wgUser->isAllowed( 'unwatchedpages' ) )
                return $wgOut->permissionRequired( 'unwatchedpages' );
-       
+
        list( $limit, $offset ) = wfCheckLimits();
 
        $wpp = new UnwatchedpagesPage();