From aeeec5397bb8d3b6fa9ad407a5fd7a102ef7f70f Mon Sep 17 00:00:00 2001 From: Arne Heizmann Date: Wed, 11 Aug 2004 00:07:12 +0000 Subject: [PATCH] In QueryPage: fixing a misleading comment. value needn't be numeric. In SpecialUncategorizedpages.php: Fixing embarrassing SQL stupidity on my part. The article that contains the category link is cl_from, not cl_to. Duh. --- includes/QueryPage.php | 11 ++++++----- includes/SpecialUncategorizedpages.php | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/includes/QueryPage.php b/includes/QueryPage.php index 0e8cef3637..57d412df61 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -16,11 +16,12 @@ class QueryPage { # Subclasses return an SQL query here. # - # Note that the query itself should return the following three columns: - # 'type' (your special page's name), 'namespace, 'title', and 'value' - # (numeric) *in that order*. These may be stored in the querycache table - # for expensive queries, and that cached data will be returned sometimes, - # so the presence of extra fields can't be relied on. + # Note that the query itself should return the following four columns: + # 'type' (your special page's name), 'namespace', 'title', and 'value' + # *in that order*. 'value' is used for sorting. These may be stored in + # the querycache table for expensive queries, and that cached data will + # be returned sometimes, so the presence of extra fields can't be + # relied upon. # # Don't include an ORDER or LIMIT clause, this will be added. diff --git a/includes/SpecialUncategorizedpages.php b/includes/SpecialUncategorizedpages.php index 6c374d8c61..8faeff64c2 100755 --- a/includes/SpecialUncategorizedpages.php +++ b/includes/SpecialUncategorizedpages.php @@ -21,8 +21,8 @@ class UncategorizedPagesPage extends PageQueryPage { extract( $dbr->tableNames( 'cur', 'categorylinks' ) ); return "SELECT 'Uncategorizedpages' as type, cur_namespace AS namespace, cur_title AS title, cur_title AS value " . - "FROM $cur LEFT JOIN $categorylinks ON cur_id=cl_to ". - "WHERE cl_to IS NULL AND cur_namespace=0 AND cur_is_redirect=0"; + "FROM $cur LEFT JOIN $categorylinks ON cur_id=cl_from ". + "WHERE cl_from IS NULL AND cur_namespace=0 AND cur_is_redirect=0"; } } -- 2.20.1