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() {
18 $prefix = $this->prefix
;
19 $t = SpecialPage
::getTitleFor( $this->getName() );
21 return Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
22 Xml
::openElement( 'fieldset' ) .
23 Xml
::element( 'legend', null, wfMsg( 'withoutinterwiki-legend' ) ) .
24 Xml
::hidden( 'title', $t->getPrefixedText() ) .
25 Xml
::inputLabel( wfMsg( 'allpagesprefix' ), 'prefix', 'wiprefix', 20, $prefix ) . ' ' .
26 Xml
::submitButton( wfMsg( 'withoutinterwiki-submit' ) ) .
27 Xml
::closeElement( 'fieldset' ) .
28 Xml
::closeElement( 'form' );
31 function sortDescending() {
35 function isExpensive() {
39 function isSyndicated() {
44 $dbr = wfGetDB( DB_SLAVE
);
45 list( $page, $langlinks ) = $dbr->tableNamesN( 'page', 'langlinks' );
46 $prefix = $this->prefix ?
"AND page_title LIKE '" . $dbr->escapeLike( $this->prefix
) . "%'" : '';
48 "SELECT 'Withoutinterwiki' AS type,
49 page_namespace AS namespace,
55 WHERE ll_title IS NULL
56 AND page_namespace=" . NS_MAIN
. "
57 AND page_is_redirect = 0
61 function setPrefix( $prefix = '' ) {
62 $this->prefix
= $prefix;
67 function wfSpecialWithoutinterwiki() {
68 global $wgRequest, $wgContLang, $wgCapitalLinks;
69 list( $limit, $offset ) = wfCheckLimits();
70 if( $wgCapitalLinks ) {
71 $prefix = $wgContLang->ucfirst( $wgRequest->getVal( 'prefix' ) );
73 $prefix = $wgRequest->getVal( 'prefix' );
75 $wip = new WithoutInterwikiPage();
76 $wip->setPrefix( $prefix );
77 $wip->doQuery( $offset, $limit );