From: Ævar Arnfjörð Bjarmason Date: Sun, 16 Oct 2005 02:04:25 +0000 (+0000) Subject: * Support including this special page X-Git-Tag: 1.6.0~1410 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=f07418625975dd3a0fcd56917fa9a4c8dd13ab86;p=lhc%2Fweb%2Fwiklou.git * Support including this special page * Minor code cleanup --- diff --git a/includes/SpecialWantedpages.php b/includes/SpecialWantedpages.php index 2f16efb5a9..2111844ba8 100644 --- a/includes/SpecialWantedpages.php +++ b/includes/SpecialWantedpages.php @@ -8,7 +8,7 @@ /** * */ -require_once ( 'QueryPage.php' ) ; +require_once 'QueryPage.php'; /** * @@ -16,6 +16,9 @@ require_once ( 'QueryPage.php' ) ; * @subpackage SpecialPage */ class WantedPagesPage extends QueryPage { + function WantedPagesPage( $inc ) { + $this->setListoutput( $inc ); + } function getName() { return 'Wantedpages'; @@ -50,23 +53,28 @@ class WantedPagesPage extends QueryPage { $text = $wgContLang->convert( $nt->getPrefixedText() ); $plink = $skin->makeBrokenLink( $nt->getPrefixedText(), $text ); - $nl = wfMsg( "nlinks", $result->value ); - $nlink = $skin->makeKnownLink( $wgContLang->specialPage( "Whatlinkshere" ), $nl, - "target=" . $nt->getPrefixedURL() ); + $nl = wfMsg( 'nlinks', $result->value ); + $nlink = $skin->makeKnownLink( $wgContLang->specialPage( 'Whatlinkshere' ), $nl, 'target=' . $nt->getPrefixedURL() ); - return "{$plink} ({$nlink})"; + return "$plink ($nlink)"; } } /** * constructor */ -function wfSpecialWantedpages() { - list( $limit, $offset ) = wfCheckLimits(); +function wfSpecialWantedpages( $par = null, $specialPage ) { + $inc = $specialPage->including(); + + if ( $inc ) { + $limit = (int)$par; + $offset = 0; + } else + list( $limit, $offset ) = wfCheckLimits(); - $wpp = new WantedPagesPage(); + $wpp = new WantedPagesPage( $inc ); - $wpp->doQuery( $offset, $limit ); + $wpp->doQuery( $offset, $limit, !$inc ); } ?>