(bug 5819) Fix the PersonalUrls hook so it's useful
[mediawiki.git] / includes / SpecialUncategorizedpages.php
blobf42a6f74daecfee0ddaf9b840cc8e1c40da6c5b0
1 <?php
2 /**
4 * @package MediaWiki
5 * @subpackage SpecialPage
6 */
8 /**
11 require_once( "QueryPage.php" );
13 /**
15 * @package MediaWiki
16 * @subpackage SpecialPage
18 class UncategorizedPagesPage extends PageQueryPage {
19 var $requestedNamespace = NS_MAIN;
21 function getName() {
22 return "Uncategorizedpages";
25 function sortDescending() {
26 return false;
29 function isExpensive() {
30 return true;
32 function isSyndicated() { return false; }
34 function getSQL() {
35 $dbr =& wfGetDB( DB_SLAVE );
36 extract( $dbr->tableNames( 'page', 'categorylinks' ) );
37 $name = $dbr->addQuotes( $this->getName() );
39 return
41 SELECT
42 $name as type,
43 page_namespace AS namespace,
44 page_title AS title,
45 page_title AS value
46 FROM $page
47 LEFT JOIN $categorylinks ON page_id=cl_from
48 WHERE cl_from IS NULL AND page_namespace={$this->requestedNamespace} AND page_is_redirect=0
53 /**
54 * constructor
56 function wfSpecialUncategorizedpages() {
57 list( $limit, $offset ) = wfCheckLimits();
59 $lpp = new UncategorizedPagesPage();
61 return $lpp->doQuery( $offset, $limit );