From 2e23bc005b0ccfc8cce7047a4cba2825d8d537ab Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 19 Jul 2005 23:43:35 +0000 Subject: [PATCH] fixed Uncategorizedcategories caching --- includes/SpecialUncategorizedcategories.php | 5 ++++- includes/SpecialUncategorizedpages.php | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/SpecialUncategorizedcategories.php b/includes/SpecialUncategorizedcategories.php index af24c824b0..ba399f0ccf 100755 --- a/includes/SpecialUncategorizedcategories.php +++ b/includes/SpecialUncategorizedcategories.php @@ -16,6 +16,10 @@ require_once( "SpecialUncategorizedpages.php" ); * @subpackage SpecialPage */ class UncategorizedCategoriesPage extends UncategorizedPagesPage { + function UncategorizedCategoriesPage() { + $this->requestedNamespace = NS_CATEGORY; + } + function getName() { return "Uncategorizedcategories"; } @@ -28,7 +32,6 @@ function wfSpecialUncategorizedcategories() { list( $limit, $offset ) = wfCheckLimits(); $lpp = new UncategorizedCategoriesPage(); - $lpp->requestedNamespace = NS_CATEGORY; return $lpp->doQuery( $offset, $limit ); } diff --git a/includes/SpecialUncategorizedpages.php b/includes/SpecialUncategorizedpages.php index 4487c3c411..5011835593 100755 --- a/includes/SpecialUncategorizedpages.php +++ b/includes/SpecialUncategorizedpages.php @@ -34,8 +34,9 @@ class UncategorizedPagesPage extends PageQueryPage { function getSQL() { $dbr =& wfGetDB( DB_SLAVE ); extract( $dbr->tableNames( 'page', 'categorylinks' ) ); + $name = $dbr->addQuotes( $this->getName() ); - return "SELECT 'Uncategorizedpages' as type, page_namespace AS namespace, page_title AS title, page_title AS value " . + return "SELECT $name as type, page_namespace AS namespace, page_title AS title, page_title AS value " . "FROM $page LEFT JOIN $categorylinks ON page_id=cl_from ". "WHERE cl_from IS NULL AND page_namespace=$this->requestedNamespace AND page_is_redirect=0"; } -- 2.20.1