Somewhat less hacky fix to the French l''''homme''' problem.
[mediawiki.git] / includes / SpecialLonelypages.php
blob5bf4d8850f8423bedbb71abbc4a8c59f947910c3
1 <?php
3 require_once( "QueryPage.php" );
5 class LonelyPagesPage extends PageQueryPage {
7 function getName() {
8 return "Lonelypages";
11 function sortDescending() {
12 return false;
15 function isExpensive() {
16 return true;
19 function getSQL() {
20 $dbr =& wfGetDB( DB_SLAVE );
21 extract( $dbr->tableNames( 'cur', 'links' ) );
23 return "SELECT 'Lonelypages' as type, cur_namespace AS namespace, cur_title AS title, cur_title AS value " .
24 "FROM $cur LEFT JOIN $links ON cur_id=l_to ".
25 "WHERE l_to IS NULL AND cur_namespace=0 AND cur_is_redirect=0";
29 function wfSpecialLonelypages() {
30 list( $limit, $offset ) = wfCheckLimits();
32 $lpp = new LonelyPagesPage();
34 return $lpp->doQuery( $offset, $limit );