(bug 32434) API allows reblocking the user without reblock parameter.
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchanges.php
index 14f9c8d..2984bc7 100644 (file)
@@ -480,7 +480,12 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                }
 
                // And now for the content
-               $this->getOutput()->setFeedAppendQuery( $this->getFeedQuery() );
+               $feedQuery = $this->getFeedQuery();
+               if ( $feedQuery !== '' ) {
+                       $this->getOutput()->setFeedAppendQuery( $feedQuery );
+               } else {
+                       $this->getOutput()->setFeedAppendQuery( false );
+               }
 
                if( $wgAllowCategorizedRecentChanges ) {
                        $this->filterByCategories( $rows, $opts );
@@ -533,11 +538,24 @@ class SpecialRecentChanges extends IncludableSpecialPage {
 
        /**
         * Get the query string to append to feed link URLs.
-        * This is overridden by RCL to add the target parameter
-        * @return bool
+        * 
+        * @return string
         */
        public function getFeedQuery() {
-               return false;
+               global $wgFeedLimit;
+
+               $this->getOptions()->validateIntBounds( 'limit', 0, $wgFeedLimit );
+               $options = $this->getOptions()->getChangedValues();
+
+               // wfArrayToCgi() omits options set to null or false
+               foreach ( $options as &$value ) {
+                       if ( $value === false ) {
+                               $value = '0';
+                       }
+               }
+               unset( $value );
+
+               return wfArrayToCgi( $options );
        }
 
        /**