From: Arne Heizmann Date: Wed, 11 Aug 2004 00:07:12 +0000 (+0000) Subject: In QueryPage: fixing a misleading comment. value needn't be numeric. X-Git-Tag: 1.5.0alpha1~2424 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=aeeec5397bb8d3b6fa9ad407a5fd7a102ef7f70f;p=lhc%2Fweb%2Fwiklou.git 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. --- 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"; } }