8 * Special page lists pages without language links
10 * @ingroup SpecialPage
11 * @author Rob Church <robchur@gmail.com>
13 class WithoutInterwikiPage
extends PageQueryPage
{
17 return 'Withoutinterwiki';
20 function getPageHeader() {
21 global $wgScript, $wgMiserMode;
23 # Do not show useless input form if wiki is running in misermode
28 $prefix = $this->prefix
;
29 $t = SpecialPage
::getTitleFor( $this->getName() );
31 return Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
32 Xml
::openElement( 'fieldset' ) .
33 Xml
::element( 'legend', null, wfMsg( 'withoutinterwiki-legend' ) ) .
34 Xml
::hidden( 'title', $t->getPrefixedText() ) .
35 Xml
::inputLabel( wfMsg( 'allpagesprefix' ), 'prefix', 'wiprefix', 20, $prefix ) . ' ' .
36 Xml
::submitButton( wfMsg( 'withoutinterwiki-submit' ) ) .
37 Xml
::closeElement( 'fieldset' ) .
38 Xml
::closeElement( 'form' );
41 function sortDescending() {
45 function isExpensive() {
49 function isSyndicated() {
54 $dbr = wfGetDB( DB_SLAVE
);
55 list( $page, $langlinks ) = $dbr->tableNamesN( 'page', 'langlinks' );
56 $prefix = $this->prefix ?
"AND page_title LIKE '" . $dbr->escapeLike( $this->prefix
) . "%'" : '';
58 "SELECT 'Withoutinterwiki' AS type,
59 page_namespace AS namespace,
65 WHERE ll_title IS NULL
66 AND page_namespace=" . NS_MAIN
. "
67 AND page_is_redirect = 0
71 function setPrefix( $prefix = '' ) {
72 $this->prefix
= $prefix;
77 function wfSpecialWithoutinterwiki() {
78 global $wgRequest, $wgContLang, $wgCapitalLinks;
79 list( $limit, $offset ) = wfCheckLimits();
80 if( $wgCapitalLinks ) {
81 $prefix = $wgContLang->ucfirst( $wgRequest->getVal( 'prefix' ) );
83 $prefix = $wgRequest->getVal( 'prefix' );
85 $wip = new WithoutInterwikiPage();
86 $wip->setPrefix( $prefix );
87 $wip->doQuery( $offset, $limit );