In QueryPage: fixing a misleading comment. value needn't be numeric.
[lhc/web/wiklou.git] / includes / SpecialUncategorizedpages.php
1 <?php
2
3 require_once( "QueryPage.php" );
4
5 class UncategorizedPagesPage extends PageQueryPage {
6
7 function getName() {
8 return "Uncategorizedpages";
9 }
10
11 function sortDescending() {
12 return false;
13 }
14
15 function isExpensive() {
16 return true;
17 }
18
19 function getSQL() {
20 $dbr =& wfGetDB( DB_SLAVE );
21 extract( $dbr->tableNames( 'cur', 'categorylinks' ) );
22
23 return "SELECT 'Uncategorizedpages' as type, cur_namespace AS namespace, cur_title AS title, cur_title AS value " .
24 "FROM $cur LEFT JOIN $categorylinks ON cur_id=cl_from ".
25 "WHERE cl_from IS NULL AND cur_namespace=0 AND cur_is_redirect=0";
26 }
27 }
28
29 function wfSpecialUncategorizedpages() {
30 list( $limit, $offset ) = wfCheckLimits();
31
32 $lpp = new UncategorizedPagesPage();
33
34 return $lpp->doQuery( $offset, $limit );
35 }
36
37 ?>