4 * Special page lists pages without language links
6 * @addtogroup SpecialPage
7 * @author Rob Church <robchur@gmail.com>
9 class WithoutInterwikiPage
extends PageQueryPage
{
13 return 'Withoutinterwiki';
16 function getPageHeader() {
17 global $wgScript, $wgContLang;
18 $prefix = $this->prefix
;
19 $t = SpecialPage
::getTitleFor( $this->getName() );
20 $align = $wgContLang->isRtl() ?
'left' : 'right';
22 $s = '<p>' . wfMsgExt( 'withoutinterwiki-header', array( 'parseinline' ) ) . '</p>';
23 $s .= Xml
::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
24 $s .= Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
25 $s .= Xml
::hidden( 'title', $t->getPrefixedText() );
26 $s .= Xml
::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'withoutinterwiki' ) );
28 <td align='$align'>" .
29 Xml
::label( wfMsg( 'allpagesprefix' ), 'wiprefix' ) .
32 Xml
::input( 'prefix', 20, htmlspecialchars ( $prefix ), array( 'id' => 'wiprefix' ) ) .
36 <td align='$align'></td>
38 Xml
::submitButton( wfMsgHtml( 'withoutinterwiki-submit' ) ) .
41 $s .= Xml
::closeElement( 'table' );
42 $s .= Xml
::closeElement( 'form' );
43 $s .= Xml
::closeElement( 'div' );
47 function sortDescending() {
51 function isExpensive() {
55 function isSyndicated() {
60 $dbr = wfGetDB( DB_SLAVE
);
61 list( $page, $langlinks ) = $dbr->tableNamesN( 'page', 'langlinks' );
62 $prefix = $this->prefix ?
"AND page_title LIKE '" . $dbr->escapeLike( $this->prefix
) . "%'" : '';
64 "SELECT 'Withoutinterwiki' AS type,
65 page_namespace AS namespace,
71 WHERE ll_title IS NULL
72 AND page_namespace=" . NS_MAIN
. "
73 AND page_is_redirect = 0
77 function setPrefix( $prefix = '' ) {
78 $this->prefix
= $prefix;
83 function wfSpecialWithoutinterwiki() {
85 list( $limit, $offset ) = wfCheckLimits();
86 $prefix = $wgRequest->getVal( 'prefix' );
87 $wip = new WithoutInterwikiPage();
88 $wip->setPrefix( $prefix );
89 $wip->doQuery( $offset, $limit );