Fix {{NUMBEROFADMINS}} magic word
[lhc/web/wiklou.git] / includes / SpecialWantedcategories.php
index a4f8020..8e75953 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
@@ -40,19 +37,17 @@ class WantedCategoriesPage extends QueryPage {
                        GROUP BY cl_to
                        ";
        }
-       
+
        function sortDescending() { return true; }
 
        /**
         * Fetch user page links and cache their existence
         */
        function preprocessResults( &$db, &$res ) {
-               global $wgLinkCache;
-
                $batch = new LinkBatch;
                while ( $row = $db->fetchObject( $res ) )
                        $batch->addObj( Title::makeTitleSafe( $row->namespace, $row->title ) );
-               $batch->execute( $wgLinkCache );
+               $batch->execute();
 
                // Back to start for display
                if ( $db->numRows( $res ) > 0 )
@@ -61,17 +56,18 @@ class WantedCategoriesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgContLang;
+               global $wgLang, $wgContLang;
 
                $nt = Title::makeTitle( $result->namespace, $result->title );
                $text = $wgContLang->convert( $nt->getText() );
-               
+
                $plink = $this->isCached() ?
                        $skin->makeLinkObj( $nt, htmlspecialchars( $text ) ) :
                        $skin->makeBrokenLinkObj( $nt, htmlspecialchars( $text ) );
-               
-               $nlinks = wfMsg( 'nlinks', $result->value );
-               return "$plink ($nlinks)";
+
+               $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'),
+                       $wgLang->formatNum( $result->value ) );
+               return wfSpecialList($plink, $nlinks);
        }
 }