* Removed the troublesome regular expression in isValidEmailAddr which returns
[lhc/web/wiklou.git] / includes / SpecialLonelypages.php
1 <?php
2 /**
3 *
4 * @package MediaWiki
5 * @subpackage SpecialPage
6 */
7
8 /**
9 *
10 */
11 require_once( "QueryPage.php" );
12
13 /**
14 *
15 * @package MediaWiki
16 * @subpackage SpecialPage
17 */
18 class LonelyPagesPage extends PageQueryPage {
19
20 function getName() {
21 return "Lonelypages";
22 }
23
24 function sortDescending() {
25 return false;
26 }
27
28 function isExpensive() {
29 return true;
30 }
31 function isSyndicated() { return false; }
32
33 function getSQL() {
34 $dbr =& wfGetDB( DB_SLAVE );
35 extract( $dbr->tableNames( 'page', 'links' ) );
36
37 return "SELECT 'Lonelypages' as type, page_namespace AS namespace, page_title AS title, page_title AS value " .
38 "FROM $page LEFT JOIN $links ON page_id=l_to ".
39 'WHERE l_to IS NULL AND page_namespace='.NS_MAIN.' AND page_is_redirect=0';
40 }
41 }
42
43 /**
44 * Constructor
45 */
46 function wfSpecialLonelypages() {
47 list( $limit, $offset ) = wfCheckLimits();
48
49 $lpp = new LonelyPagesPage();
50
51 return $lpp->doQuery( $offset, $limit );
52 }
53
54 ?>