AutoLoad RecentChange
[lhc/web/wiklou.git] / includes / SpecialWantedpages.php
index dcae3ec..c92f059 100644 (file)
@@ -49,6 +49,7 @@ class WantedPagesPage extends QueryPage {
                         LEFT JOIN $page AS pg2
                         ON pl_from = pg2.page_id
                         WHERE pg1.page_namespace IS NULL
+                        AND pl_namespace NOT IN ( 2, 3 )
                         AND pg2.page_namespace != 8
                         GROUP BY pl_namespace, pl_title
                         HAVING COUNT(*) > $count";
@@ -71,7 +72,7 @@ class WantedPagesPage extends QueryPage {
 
 
        function formatResult( $skin, $result ) {
-               global $wgContLang;
+               global $wgLang;
 
                $title = Title::makeTitleSafe( $result->namespace, $result->title );
 
@@ -81,8 +82,8 @@ class WantedPagesPage extends QueryPage {
                                # Make a redlink
                                $pageLink = $skin->makeBrokenLinkObj( $title );
                        } else {
-                               # Make a struck-out blue link
-                               $pageLink = "<s>" . $skin->makeKnownLinkObj( $title ) . "</s>";
+                               # Make a a struck-out normal link
+                               $pageLink = "<s>" . $skin->makeLinkObj( $title ) . "</s>";
                        }               
                } else {
                        # Not cached? Don't bother checking existence; it can't
@@ -91,10 +92,12 @@ class WantedPagesPage extends QueryPage {
                
                # Make a link to "what links here" if it's required
                $wlhLink = $this->nlinks
-                                       ? " (" . $this->makeWlhLink( $title, $skin, wfMsgHtml( 'nlinks', $result->value ) ) . ")"
-                                       : "";
+                                       ? $this->makeWlhLink( $title, $skin,
+                                                       wfMsgExt( 'nlinks', array( 'parsemag', 'escape'),
+                                                               $wgLang->formatNum( $result->value ) ) )
+                                       : null;
                                        
-               return "{$pageLink}{$wlhLink}";
+               return wfSpecialList($pageLink, $wlhLink);
        }
        
        /**
@@ -106,7 +109,7 @@ class WantedPagesPage extends QueryPage {
         */
        function makeWlhLink( &$title, &$skin, $text ) {
                $wlhTitle = Title::makeTitle( NS_SPECIAL, 'Whatlinkshere' );
-               return $skin->makeKnownLinkObj( $wlhTitle, $text, 'target=' . $title->getPrefixedUrl() );               
+               return $skin->makeKnownLinkObj( $wlhTitle, $text, 'target=' . $title->getPrefixedUrl() );
        }
        
 }