Remove @param comments that literally repeat what the code says
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchanges.php
index bdca301..2461754 100644 (file)
@@ -33,6 +33,8 @@ use Wikimedia\Rdbms\FakeResultWrapper;
 class SpecialRecentChanges extends ChangesListSpecialPage {
 
        protected static $savedQueriesPreferenceName = 'rcfilters-saved-queries';
+       protected static $daysPreferenceName = 'rcdays'; // Use general RecentChanges preference
+       protected static $limitPreferenceName = 'rcfilters-limit'; // Use RCFilters-specific preference
 
        private $watchlistFilterGroupDefinition;
 
@@ -823,7 +825,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
        /**
         * Makes change an option link which carries all the other options
         *
-        * @param string $title Title
+        * @param string $title
         * @param array $override Options to override
         * @param array $options Current options
         * @param bool $active Whether to show the link in bold
@@ -974,11 +976,14 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
                return 60 * 5;
        }
 
-       function getDefaultLimit() {
-               return $this->getUser()->getIntOption( 'rclimit' );
-       }
+       public function getDefaultLimit() {
+               $systemPrefValue = $this->getUser()->getIntOption( 'rclimit' );
+               // Prefer the RCFilters-specific preference if RCFilters is enabled
+               if ( $this->isStructuredFilterUiEnabled() ) {
+                       return $this->getUser()->getIntOption( static::$limitPreferenceName, $systemPrefValue );
+               }
 
-       function getDefaultDays() {
-               return floatval( $this->getUser()->getOption( 'rcdays' ) );
+               // Otherwise, use the system rclimit preference value
+               return $systemPrefValue;
        }
 }