RCFilters: make isStructuredFilterUiEnabled public
authorStephane Bisson <sbisson@wikimedia.org>
Fri, 1 Sep 2017 14:47:40 +0000 (10:47 -0400)
committerSbisson <sbisson@wikimedia.org>
Fri, 1 Sep 2017 18:47:24 +0000 (18:47 +0000)
... so it can be used by ORES to know if it's
enabled on a specific page without duplicating
the checks of global variables, user preferences,
and request parameters.

Bug: T174725
Change-Id: I1cb402559edb242b40a77f509480560f0636264d

includes/specialpage/ChangesListSpecialPage.php
includes/specials/SpecialWatchlist.php

index acd5d14..5f54404 100644 (file)
@@ -1536,7 +1536,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         *
         * @return bool
         */
-       protected function isStructuredFilterUiEnabled() {
+       public function isStructuredFilterUiEnabled() {
                return $this->getUser()->getOption( 'rcenhancedfilters' );
        }
 
index ba3cb87..7049744 100644 (file)
@@ -111,7 +111,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                }
        }
 
-       protected function isStructuredFilterUiEnabled() {
+       public function isStructuredFilterUiEnabled() {
                return parent::isStructuredFilterUiEnabled()
                        && ( $this->getConfig()->get( 'StructuredChangeFiltersOnWatchlist' )
                                || $this->getRequest()->getBool( 'rcfilters' ) );