From 372cb42b583e63020317c61b16162bcac599518a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Wed, 9 Oct 2013 22:07:14 +0200 Subject: [PATCH] Make SpecialWatchlist extend SpecialRecentChanges (temporarily) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- includes/specials/SpecialRecentchanges.php | 10 +++++++--- includes/specials/SpecialWatchlist.php | 10 +++++----- 2 files changed, 12 insertions(+), 8 deletions(-) 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'; - } } -- 2.20.1