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' );
"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";
}