I take 5% of blame for this idiocy
authorDomas Mituzas <midom@users.mediawiki.org>
Sun, 27 Sep 2009 00:53:07 +0000 (00:53 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Sun, 27 Sep 2009 00:53:07 +0000 (00:53 +0000)
includes/specials/SpecialMostlinked.php

index 346bcbc..e8d1bcd 100644 (file)
@@ -22,9 +22,6 @@ class MostlinkedPage extends QueryPage {
        function isExpensive() { return true; }
        function isSyndicated() { return false; }
 
-       /**
-        * Note: Getting page_namespace only works if $this->isCached() is false
-        */
        function getSQL() {
                $dbr = wfGetDB( DB_SLAVE );
                list( $pagelinks, $page ) = $dbr->tableNamesN( 'pagelinks', 'page' );
@@ -32,11 +29,10 @@ class MostlinkedPage extends QueryPage {
                        "SELECT 'Mostlinked' AS type,
                                pl_namespace AS namespace,
                                pl_title AS title,
-                               COUNT(*) AS value,
-                               page_namespace
+                               COUNT(*) AS value
                        FROM $pagelinks
                        LEFT JOIN $page ON pl_namespace=page_namespace AND pl_title=page_title
-                       GROUP BY pl_namespace, pl_title, page_namespace
+                       GROUP BY pl_namespace, pl_title
                        HAVING COUNT(*) > 1";
        }