From: Alexandre Emsenhuber Date: Sat, 18 Oct 2008 20:16:26 +0000 (+0000) Subject: Fix SQL query so that it works properly X-Git-Tag: 1.31.0-rc.0~44697 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=91ebcbb8f0e7e8505f856b17c5187e9ec466b7fa;p=lhc%2Fweb%2Fwiklou.git Fix SQL query so that it works properly --- diff --git a/includes/specials/SpecialWantedtemplates.php b/includes/specials/SpecialWantedtemplates.php index 65bbecc83c..43b5cf8f87 100644 --- a/includes/specials/SpecialWantedtemplates.php +++ b/includes/specials/SpecialWantedtemplates.php @@ -35,13 +35,13 @@ class WantedTemplatesPage extends QueryPage { $name = $dbr->addQuotes( $this->getName() ); return " - SELECT $name as type," . - NS_TEMPLATE . " as namespace, + SELECT $name as type, + tl_namespace as namespace, tl_title as title, COUNT(*) as value FROM $templatelinks LEFT JOIN - $page ON tl_title = page_title AND page_namespace = ". NS_TEMPLATE ." - WHERE page_title IS NULL + $page ON tl_title = page_title AND tl_namespace = page_namespace + WHERE page_title IS NULL AND tl_namespace = ". NS_TEMPLATE ." GROUP BY tl_title "; }