In QueryPage: fixing a misleading comment. value needn't be numeric.
authorArne Heizmann <timwi@users.mediawiki.org>
Wed, 11 Aug 2004 00:07:12 +0000 (00:07 +0000)
committerArne Heizmann <timwi@users.mediawiki.org>
Wed, 11 Aug 2004 00:07:12 +0000 (00:07 +0000)
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
includes/SpecialUncategorizedpages.php

index 0e8cef3..57d412d 100644 (file)
@@ -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.
 
index 6c374d8..8faeff6 100755 (executable)
@@ -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";
        }
 }