Another fix.
[lhc/web/wiklou.git] / includes / SpecialWantedcategories.php
index df152aa..eab44d6 100644 (file)
@@ -2,20 +2,15 @@
 /**
  * A querypage to list the most wanted categories
  *
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
  *
  * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
  * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
  */
 
-/* */
-require_once 'QueryPage.php';
-
 /**
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
  */
 class WantedCategoriesPage extends QueryPage {
 
@@ -24,8 +19,8 @@ class WantedCategoriesPage extends QueryPage {
        function isSyndicated() { return false; }
 
        function getSQL() {
-               $dbr =& wfGetDB( DB_SLAVE );
-               extract( $dbr->tableNames( 'categorylinks', 'page' ) );
+               $dbr = wfGetDB( DB_SLAVE );
+               list( $categorylinks, $page ) = $dbr->tableNamesN( 'categorylinks', 'page' );
                $name = $dbr->addQuotes( $this->getName() );
                return
                        "
@@ -37,7 +32,7 @@ class WantedCategoriesPage extends QueryPage {
                        FROM $categorylinks
                        LEFT JOIN $page ON cl_to = page_title AND page_namespace = ". NS_CATEGORY ."
                        WHERE page_title IS NULL
-                       GROUP BY cl_to
+                       GROUP BY 1,2,3
                        ";
        }
 
@@ -59,7 +54,7 @@ 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() );
@@ -68,7 +63,8 @@ class WantedCategoriesPage extends QueryPage {
                        $skin->makeLinkObj( $nt, htmlspecialchars( $text ) ) :
                        $skin->makeBrokenLinkObj( $nt, htmlspecialchars( $text ) );
 
-               $nlinks = wfMsg( 'nlinks', $result->value );
+               $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'),
+                       $wgLang->formatNum( $result->value ) );
                return wfSpecialList($plink, $nlinks);
        }
 }