r10208 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r10207‎ | r10208 | r10209 >
Date:23:43, 19 July 2005
Author:timstarling
Status:old
Tags:
Comment:
fixed Uncategorizedcategories caching
Modified paths:
  • /trunk/phase3/includes/SpecialUncategorizedcategories.php (modified) (history)
  • /trunk/phase3/includes/SpecialUncategorizedpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUncategorizedpages.php
@@ -34,8 +34,9 @@
3535 function getSQL() {
3636 $dbr =& wfGetDB( DB_SLAVE );
3737 extract( $dbr->tableNames( 'page', 'categorylinks' ) );
 38+ $name = $dbr->addQuotes( $this->getName() );
3839
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 " .
4041 "FROM $page LEFT JOIN $categorylinks ON page_id=cl_from ".
4142 "WHERE cl_from IS NULL AND page_namespace=$this->requestedNamespace AND page_is_redirect=0";
4243 }
Index: trunk/phase3/includes/SpecialUncategorizedcategories.php
@@ -16,6 +16,10 @@
1717 * @subpackage SpecialPage
1818 */
1919 class UncategorizedCategoriesPage extends UncategorizedPagesPage {
 20+ function UncategorizedCategoriesPage() {
 21+ $this->requestedNamespace = NS_CATEGORY;
 22+ }
 23+
2024 function getName() {
2125 return "Uncategorizedcategories";
2226 }
@@ -28,7 +32,6 @@
2933 list( $limit, $offset ) = wfCheckLimits();
3034
3135 $lpp = new UncategorizedCategoriesPage();
32 - $lpp->requestedNamespace = NS_CATEGORY;
3336
3437 return $lpp->doQuery( $offset, $limit );
3538 }

Status & tagging log