Index: trunk/phase3/includes/SpecialUncategorizedpages.php |
— | — | @@ -34,8 +34,9 @@ |
35 | 35 | function getSQL() { |
36 | 36 | $dbr =& wfGetDB( DB_SLAVE ); |
37 | 37 | extract( $dbr->tableNames( 'page', 'categorylinks' ) ); |
| 38 | + $name = $dbr->addQuotes( $this->getName() ); |
38 | 39 | |
39 | | - return "SELECT 'Uncategorizedpages' as type, page_namespace AS namespace, page_title AS title, page_title AS value " . |
| 40 | + return "SELECT $name as type, page_namespace AS namespace, page_title AS title, page_title AS value " . |
40 | 41 | "FROM $page LEFT JOIN $categorylinks ON page_id=cl_from ". |
41 | 42 | "WHERE cl_from IS NULL AND page_namespace=$this->requestedNamespace AND page_is_redirect=0"; |
42 | 43 | } |
Index: trunk/phase3/includes/SpecialUncategorizedcategories.php |
— | — | @@ -16,6 +16,10 @@ |
17 | 17 | * @subpackage SpecialPage |
18 | 18 | */ |
19 | 19 | class UncategorizedCategoriesPage extends UncategorizedPagesPage { |
| 20 | + function UncategorizedCategoriesPage() { |
| 21 | + $this->requestedNamespace = NS_CATEGORY; |
| 22 | + } |
| 23 | + |
20 | 24 | function getName() { |
21 | 25 | return "Uncategorizedcategories"; |
22 | 26 | } |
— | — | @@ -28,7 +32,6 @@ |
29 | 33 | list( $limit, $offset ) = wfCheckLimits(); |
30 | 34 | |
31 | 35 | $lpp = new UncategorizedCategoriesPage(); |
32 | | - $lpp->requestedNamespace = NS_CATEGORY; |
33 | 36 | |
34 | 37 | return $lpp->doQuery( $offset, $limit ); |
35 | 38 | } |