1567b290bd0c713b9ffb8c4aa37204c28ba2e1dd
[lhc/web/wiklou.git] / includes / SpecialWithoutinterwiki.php
1 <?php
2
3 /**
4 * Special page lists pages without language links
5 *
6 * @package MediaWiki
7 * @author Rob Church <robchur@gmail.com>
8 */
9 class WithoutInterwikiPage extends PageQueryPage {
10
11 function getName() {
12 return 'Withoutinterwiki';
13 }
14
15 function getPageHeader() {
16 return '<p>' . wfMsgHtml( 'withoutinterwiki-header' ) . '</p>';
17 }
18
19 function sortDescending() {
20 return false;
21 }
22
23 function isExpensive() {
24 return true;
25 }
26
27 function isSyndicated() {
28 return false;
29 }
30
31 function getSQL() {
32 $dbr = wfGetDB( DB_SLAVE );
33 list( $page, $langlinks ) = $dbr->tableNamesN( 'page', 'langlinks' );
34 return
35 "SELECT 'Withoutinterwiki' AS type,
36 page_namespace AS namespace,
37 page_title AS title,
38 page_title AS value
39 FROM $page
40 LEFT JOIN $langlinks
41 ON ll_from = page_id
42 WHERE ll_title IS NULL
43 AND page_namespace=" . NS_MAIN . "
44 AND page_is_redirect = 0";
45 }
46
47 }
48
49 function wfSpecialWithoutinterwiki() {
50 list( $limit, $offset ) = wfCheckLimits();
51 $wip = new WithoutInterwikiPage();
52 $wip->doQuery( $offset, $limit );
53 }
54
55 ?>