4 * Special page lists pages without language links
7 * @addtogroup SpecialPage
8 * @author Rob Church <robchur@gmail.com>
10 class WithoutInterwikiPage
extends PageQueryPage
{
14 return 'Withoutinterwiki';
17 function getPageHeader() {
18 global $wgScript, $wgContLang;
19 $prefix = $this->prefix
;
20 $t = SpecialPage
::getTitleFor( $this->getName() );
21 $align = $wgContLang->isRtl() ?
'left' : 'right';
23 $s = '<p>' . wfMsgExt( 'withoutinterwiki-header', array( 'parseinline' ) ) . '</p>';
24 $s .= Xml
::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
25 $s .= Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
26 $s .= Xml
::hidden( 'title', $t->getPrefixedText() );
27 $s .= Xml
::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'withoutinterwiki' ) );
29 <td align='$align'>" .
30 Xml
::label( wfMsg( 'allpagesprefix' ), 'wiprefix' ) .
33 Xml
::input( 'prefix', 20, htmlspecialchars ( $prefix ), array( 'id' => 'wiprefix' ) ) .
37 <td align='$align'></td>
39 Xml
::submitButton( wfMsgHtml( 'withoutinterwiki-submit' ) ) .
42 $s .= Xml
::closeElement( 'table' );
43 $s .= Xml
::closeElement( 'form' );
44 $s .= Xml
::closeElement( 'div' );
48 function sortDescending() {
52 function isExpensive() {
56 function isSyndicated() {
61 $dbr = wfGetDB( DB_SLAVE
);
62 list( $page, $langlinks ) = $dbr->tableNamesN( 'page', 'langlinks' );
63 $prefix = $this->prefix ?
"AND page_title LIKE '" . $dbr->escapeLike( $this->prefix
) . "%'" : '';
65 "SELECT 'Withoutinterwiki' AS type,
66 page_namespace AS namespace,
72 WHERE ll_title IS NULL
73 AND page_namespace=" . NS_MAIN
. "
74 AND page_is_redirect = 0
78 function setPrefix( $prefix = '' ) {
79 $this->prefix
= $prefix;
84 function wfSpecialWithoutinterwiki() {
86 list( $limit, $offset ) = wfCheckLimits();
87 $prefix = $wgRequest->getVal( 'prefix' );
88 $wip = new WithoutInterwikiPage();
89 $wip->setPrefix( $prefix );
90 $wip->doQuery( $offset, $limit );