5 * @subpackage SpecialPage
11 require_once ( 'QueryPage.php' ) ;
16 * @subpackage SpecialPage
18 class WantedPagesPage
extends QueryPage
{
24 function isExpensive() {
27 function isSyndicated() { return false; }
30 $dbr =& wfGetDB( DB_SLAVE
);
31 $pagelinks = $dbr->tableName( 'pagelinks' );
32 $page = $dbr->tableName( 'page' );
34 "SELECT 'Wantedpages' AS type,
35 pl_namespace AS namespace,
40 ON pl_namespace=page_namespace AND pl_title=page_title
41 WHERE page_namespace IS NULL
42 GROUP BY pl_namespace,pl_title
46 function formatResult( $skin, $result ) {
49 $nt = Title
::makeTitle( $result->namespace, $result->title
);
50 $text = $wgContLang->convert( $nt->getPrefixedText() );
51 $plink = $skin->makeBrokenLink( $nt->getPrefixedText(), $text );
53 $nl = wfMsg( "nlinks", $result->value
);
54 $nlink = $skin->makeKnownLink( $wgContLang->specialPage( "Whatlinkshere" ), $nl,
55 "target=" . $nt->getPrefixedURL() );
57 return "{$plink} ({$nlink})";
64 function wfSpecialWantedpages() {
65 list( $limit, $offset ) = wfCheckLimits();
67 $wpp = new WantedPagesPage();
69 $wpp->doQuery( $offset, $limit );