From: Bartosz Dziewoński Date: Wed, 9 Oct 2013 20:07:14 +0000 (+0200) Subject: Make SpecialWatchlist extend SpecialRecentChanges (temporarily) X-Git-Tag: 1.31.0-rc.0~17442^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=372cb42b583e63020317c61b16162bcac599518a;p=lhc%2Fweb%2Fwiklou.git Make SpecialWatchlist extend SpecialRecentChanges (temporarily) Later both will be made to inherit from a base class, but this makes some things simpler for now. * `class SpecialWatchlist extends SpecialRecentChanges { … }` * Fixes to both classes to ensure nothing breaks * Remove redundant SpecialWatchlist#getGroupName() No functional changes yet; just the framework change. Refactoring follows in subsequent commits, with a base class for both of these being introduced in I5855074deed52fd7492f033c8a8fced8af647602. Bug: 48641 Change-Id: I394ab71bae876684e8f78236843861c7dd2ae22d --- diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index f86615892b..81ef7ed432 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -26,7 +26,7 @@ * * @ingroup SpecialPage */ -class SpecialRecentChanges extends IncludableSpecialPage { +class SpecialRecentChanges extends SpecialPage { var $rcOptions, $rcSubpage; protected $customFilters; @@ -38,8 +38,12 @@ class SpecialRecentChanges extends IncludableSpecialPage { */ protected $feedFormat; - public function __construct( $name = 'Recentchanges' ) { - parent::__construct( $name ); + public function __construct( $name = 'Recentchanges', $restriction = '' ) { + parent::__construct( $name, $restriction ); + } + + public function isIncludable() { + return true; } /** diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 4d86744781..19d2540968 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -20,7 +20,7 @@ * @file * @ingroup SpecialPage Watchlist */ -class SpecialWatchlist extends SpecialPage { +class SpecialWatchlist extends SpecialRecentChanges { protected $customFilters; /** @@ -30,6 +30,10 @@ class SpecialWatchlist extends SpecialPage { parent::__construct( $page, $restriction ); } + public function isIncludable() { + return false; + } + /** * Execute * @param $par Parameter passed to the page @@ -502,8 +506,4 @@ class SpecialWatchlist extends SpecialPage { return floor( $count / 2 ); } - - protected function getGroupName() { - return 'changes'; - } }