Defintly fix bug 962795 : Order using A-Z
[lhc/web/wiklou.git] / includes / SpecialLonelypages.php
1 <?php
2
3 require_once( "QueryPage.php" );
4
5 class LonelyPagesPage extends PageQueryPage {
6
7 function getName() {
8 return "Lonelypages";
9 }
10
11 function isExpensive() {
12 return 1;
13 }
14
15 function sortDescending() {
16 return false;
17 }
18
19 function getSQL( $offset, $limit ) {
20
21 return "SELECT cur_namespace AS namespace, cur_title AS title, cur_title AS value " .
22 "FROM cur LEFT JOIN links ON cur_id=l_to ".
23 "WHERE l_to IS NULL AND cur_namespace=0 AND cur_is_redirect=0";
24 }
25 }
26
27 function wfSpecialLonelypages()
28 {
29 list( $limit, $offset ) = wfCheckLimits();
30
31 $lpp = new LonelyPagesPage();
32
33 return $lpp->doQuery( $offset, $limit );
34 }
35
36 ?>