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, $wgMiserMode;
19 # Do not show useless input form if wiki is running in misermode
24 $prefix = $this->prefix
;
25 $t = SpecialPage
::getTitleFor( $this->getName() );
27 return Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
28 Xml
::openElement( 'fieldset' ) .
29 Xml
::element( 'legend', null, wfMsg( 'withoutinterwiki-legend' ) ) .
30 Xml
::hidden( 'title', $t->getPrefixedText() ) .
31 Xml
::inputLabel( wfMsg( 'allpagesprefix' ), 'prefix', 'wiprefix', 20, $prefix ) . ' ' .
32 Xml
::submitButton( wfMsg( 'withoutinterwiki-submit' ) ) .
33 Xml
::closeElement( 'fieldset' ) .
34 Xml
::closeElement( 'form' );
37 function sortDescending() {
41 function isExpensive() {
45 function isSyndicated() {
50 $dbr = wfGetDB( DB_SLAVE
);
51 list( $page, $langlinks ) = $dbr->tableNamesN( 'page', 'langlinks' );
52 $prefix = $this->prefix ?
"AND page_title LIKE '" . $dbr->escapeLike( $this->prefix
) . "%'" : '';
54 "SELECT 'Withoutinterwiki' AS type,
55 page_namespace AS namespace,
61 WHERE ll_title IS NULL
62 AND page_namespace=" . NS_MAIN
. "
63 AND page_is_redirect = 0
67 function setPrefix( $prefix = '' ) {
68 $this->prefix
= $prefix;
73 function wfSpecialWithoutinterwiki() {
74 global $wgRequest, $wgContLang, $wgCapitalLinks;
75 list( $limit, $offset ) = wfCheckLimits();
76 if( $wgCapitalLinks ) {
77 $prefix = $wgContLang->ucfirst( $wgRequest->getVal( 'prefix' ) );
79 $prefix = $wgRequest->getVal( 'prefix' );
81 $wip = new WithoutInterwikiPage();
82 $wip->setPrefix( $prefix );
83 $wip->doQuery( $offset, $limit );