Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/89379


Change subject: Make SpecialWatchlist extend SpecialRecentChanges: step 1
......................................................................

Make SpecialWatchlist extend SpecialRecentChanges: step 1

* `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
will follow in subsequent commits.

Change-Id: I394ab71bae876684e8f78236843861c7dd2ae22d
---
M includes/specials/SpecialRecentchanges.php
M includes/specials/SpecialWatchlist.php
2 files changed, 12 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/79/89379/4

diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index 51e7450..43139b8 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -26,12 +26,16 @@
  *
  * @ingroup SpecialPage
  */
-class SpecialRecentChanges extends IncludableSpecialPage {
+class SpecialRecentChanges extends SpecialPage {
        var $rcOptions, $rcSubpage;
        protected $customFilters;
 
-       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 62c33a2..cdf63e4 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;
 
        /**
@@ -28,6 +28,10 @@
         */
        public function __construct( $page = 'Watchlist', $restriction = 
'viewmywatchlist' ) {
                parent::__construct( $page, $restriction );
+       }
+
+       public function isIncludable() {
+               return false;
        }
 
        /**
@@ -508,9 +512,5 @@
                $count = $row->count;
 
                return floor( $count / 2 );
-       }
-
-       protected function getGroupName() {
-               return 'changes';
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/89379
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I394ab71bae876684e8f78236843861c7dd2ae22d
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to