diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2008-08-15 01:29:47 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2008-08-15 01:29:47 +0200 |
commit | 370e83bb0dfd0c70de268c93bf07ad5ee0897192 (patch) | |
tree | 491674f4c242e4d6ba0d04eafa305174c35a3391 /includes/specials/SpecialUncategorizedpages.php | |
parent | f4debf0f12d0524d2b2427c55ea3f16b680fad97 (diff) |
Update auf 1.13.0
Diffstat (limited to 'includes/specials/SpecialUncategorizedpages.php')
-rw-r--r-- | includes/specials/SpecialUncategorizedpages.php | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/includes/specials/SpecialUncategorizedpages.php b/includes/specials/SpecialUncategorizedpages.php new file mode 100644 index 00000000..e7f0aaca --- /dev/null +++ b/includes/specials/SpecialUncategorizedpages.php @@ -0,0 +1,55 @@ +<?php +/** + * @file + * @ingroup SpecialPage + */ + +/** + * A special page looking for page without any category. + * @ingroup SpecialPage + */ +class UncategorizedPagesPage extends PageQueryPage { + var $requestedNamespace = NS_MAIN; + + function getName() { + return "Uncategorizedpages"; + } + + function sortDescending() { + return false; + } + + function isExpensive() { + return true; + } + function isSyndicated() { return false; } + + function getSQL() { + $dbr = wfGetDB( DB_SLAVE ); + list( $page, $categorylinks ) = $dbr->tableNamesN( 'page', 'categorylinks' ); + $name = $dbr->addQuotes( $this->getName() ); + + 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 + "; + } +} + +/** + * constructor + */ +function wfSpecialUncategorizedpages() { + list( $limit, $offset ) = wfCheckLimits(); + + $lpp = new UncategorizedPagesPage(); + + return $lpp->doQuery( $offset, $limit ); +} |