* Fixed E_NOTICE..
[mediawiki.git] / includes / SpecialWithoutinterwiki.php
blob334645860f985ac93a208304b24cc23d5fd343d9
1 <?php
3 /**
4 * Special page lists pages without language links
6 * @package MediaWiki
7 * @addtogroup SpecialPage
8 * @author Rob Church <robchur@gmail.com>
9 */
10 class WithoutInterwikiPage extends PageQueryPage {
12 function getName() {
13 return 'Withoutinterwiki';
16 function getPageHeader() {
17 return '<p>' . wfMsgExt( 'withoutinterwiki-header', array( 'parseinline' ) ) . '</p>';
20 function sortDescending() {
21 return false;
24 function isExpensive() {
25 return true;
28 function isSyndicated() {
29 return false;
32 function getSQL() {
33 $dbr = wfGetDB( DB_SLAVE );
34 list( $page, $langlinks ) = $dbr->tableNamesN( 'page', 'langlinks' );
35 return
36 "SELECT 'Withoutinterwiki' AS type,
37 page_namespace AS namespace,
38 page_title AS title,
39 page_title AS value
40 FROM $page
41 LEFT JOIN $langlinks
42 ON ll_from = page_id
43 WHERE ll_title IS NULL
44 AND page_namespace=" . NS_MAIN . "
45 AND page_is_redirect = 0";
50 function wfSpecialWithoutinterwiki() {
51 list( $limit, $offset ) = wfCheckLimits();
52 $wip = new WithoutInterwikiPage();
53 $wip->doQuery( $offset, $limit );