Make sure BlockHideName really defaults to 0, not false. Fixes bug 10007.
[lhc/web/wiklou.git] / includes / SpecialLonelypages.php
1 <?php
2 /**
3 *
4 * @addtogroup SpecialPage
5 */
6
7 /**
8 * A special page looking for articles with no article linking to them,
9 * thus being lonely.
10 * @addtogroup SpecialPage
11 */
12 class LonelyPagesPage extends PageQueryPage {
13
14 function getName() {
15 return "Lonelypages";
16 }
17 function getPageHeader() {
18 return '<p>' . wfMsg('lonelypagestext') . '</p>';
19 }
20
21 function sortDescending() {
22 return false;
23 }
24
25 function isExpensive() {
26 return true;
27 }
28 function isSyndicated() { return false; }
29
30 function getSQL() {
31 $dbr = wfGetDB( DB_SLAVE );
32 list( $page, $pagelinks ) = $dbr->tableNamesN( 'page', 'pagelinks' );
33
34 return
35 "SELECT 'Lonelypages' AS type,
36 page_namespace AS namespace,
37 page_title AS title,
38 page_title AS value
39 FROM $page
40 LEFT JOIN $pagelinks
41 ON page_namespace=pl_namespace AND page_title=pl_title
42 WHERE pl_namespace IS NULL
43 AND page_namespace=".NS_MAIN."
44 AND page_is_redirect=0";
45
46 }
47 }
48
49 /**
50 * Constructor
51 */
52 function wfSpecialLonelypages() {
53 list( $limit, $offset ) = wfCheckLimits();
54
55 $lpp = new LonelyPagesPage();
56
57 return $lpp->doQuery( $offset, $limit );
58 }
59
60 ?>