Merge "user: Allow "CAS update failed" exceptions to be normalised"
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index 41a059f..432cfcc 100644 (file)
@@ -289,20 +289,6 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                }
        }
 
-       /**
-        * Get all custom filters
-        *
-        * @return array Map of filter URL param names to properties (msg/default)
-        */
-       protected function getCustomFilters() {
-               if ( $this->customFilters === null ) {
-                       $this->customFilters = parent::getCustomFilters();
-                       Hooks::run( 'SpecialWatchlistFilters', [ $this, &$this->customFilters ], '1.23' );
-               }
-
-               return $this->customFilters;
-       }
-
        /**
         * Fetch values for a FormOptions object from the WebRequest associated with this instance.
         *
@@ -493,9 +479,10 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                $dbr = $this->getDB();
                $user = $this->getUser();
                $output = $this->getOutput();
+               $services = MediaWikiServices::getInstance();
 
                # Show a message about replica DB lag, if applicable
-               $lag = MediaWikiServices::getInstance()->getDBLoadBalancer()->safeGetLag( $dbr );
+               $lag = $services->getDBLoadBalancer()->safeGetLag( $dbr );
                if ( $lag > 0 ) {
                        $output->showLagWarning( $lag );
                }
@@ -535,7 +522,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                if ( $this->getConfig()->get( 'RCShowWatchingUsers' )
                        && $user->getOption( 'shownumberswatching' )
                ) {
-                       $watchedItemStore = MediaWikiServices::getInstance()->getWatchedItemStore();
+                       $watchedItemStore = $services->getWatchedItemStore();
                }
 
                $s = $list->beginRecentChangesList();
@@ -777,7 +764,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                ] ) );
                asort( $hours );
 
-               $select = new XmlSelect( 'days', 'days', $selectedHours / 24 );
+               $select = new XmlSelect( 'days', 'days', (float)( $selectedHours / 24 ) );
 
                foreach ( $hours as $value ) {
                        if ( $value < 24 ) {
@@ -785,7 +772,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                        } else {
                                $name = $this->msg( 'days' )->numParams( $value / 24 )->text();
                        }
-                       $select->addOption( $name, $value / 24 );
+                       $select->addOption( $name, (float)( $value / 24 ) );
                }
 
                return $select->getHTML() . "\n<br />\n";