'SpecialStatistics' => 'includes/specials/SpecialStatistics.php',
'SpecialTags' => 'includes/specials/SpecialTags.php',
'SpecialVersion' => 'includes/specials/SpecialVersion.php',
+ 'SpecialWhatlinkshere' => 'includes/specials/SpecialWhatlinkshere.php',
'UncategorizedCategoriesPage' => 'includes/specials/SpecialUncategorizedcategories.php',
'UncategorizedPagesPage' => 'includes/specials/SpecialUncategorizedpages.php',
'UncategorizedTemplatesPage' => 'includes/specials/SpecialUncategorizedtemplates.php',
'WantedFilesPage' => 'includes/specials/SpecialWantedfiles.php',
'WantedPagesPage' => 'includes/specials/SpecialWantedpages.php',
'WantedTemplatesPage' => 'includes/specials/SpecialWantedtemplates.php',
- 'WhatLinksHerePage' => 'includes/specials/SpecialWhatlinkshere.php',
'WikiImporter' => 'includes/Import.php',
'WikiRevision' => 'includes/Import.php',
'WithoutInterwikiPage' => 'includes/specials/SpecialWithoutinterwiki.php',
'Export' => 'SpecialExport',
'Import' => 'SpecialImport',
'Undelete' => array( 'SpecialPage', 'Undelete', 'deletedhistory' ),
- 'Whatlinkshere' => array( 'SpecialPage', 'Whatlinkshere' ),
+ 'Whatlinkshere' => 'SpecialWhatlinkshere',
'MergeHistory' => array( 'SpecialPage', 'MergeHistory', 'mergehistory' ),
# Other
* @ingroup SpecialPage
*/
-/**
- * Entry point
- * @param $par String: An article name ??
- */
-function wfSpecialWhatlinkshere($par = NULL) {
- global $wgRequest;
- $page = new WhatLinksHerePage( $wgRequest, $par );
- $page->execute();
-}
-
/**
* implements Special:Whatlinkshere
* @ingroup SpecialPage
*/
-class WhatLinksHerePage {
- // Stored data
- protected $par;
+class SpecialWhatLinksHere extends SpecialPage {
// Stored objects
protected $opts, $target, $selfTitle;
// Stored globals
- protected $skin, $request;
+ protected $skin;
protected $limits = array( 20, 50, 100, 250, 500 );
- function WhatLinksHerePage( $request, $par = null ) {
+ public function __construct() {
+ parent::__construct( 'Whatlinkshere' );
global $wgUser;
- $this->request = $request;
$this->skin = $wgUser->getSkin();
- $this->par = $par;
}
- function execute() {
- global $wgOut;
+ function execute( $par ) {
+ global $wgOut, $wgRequest;
$opts = new FormOptions();
$opts->add( 'hidelinks', false );
$opts->add( 'hideimages', false );
- $opts->fetchValuesFromRequest( $this->request );
+ $opts->fetchValuesFromRequest( $wgRequest );
$opts->validateIntBounds( 'limit', 0, 5000 );
// Give precedence to subpage syntax
- if ( isset($this->par) ) {
- $opts->setValue( 'target', $this->par );
+ if ( isset($par) ) {
+ $opts->setValue( 'target', $par );
}
// Bind to member variable