}
// 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 );
/**
* 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 );
}
/**
}
}
- public function getFeedQuery() {
- $target = $this->getTargetTitle();
- if( $target ) {
- return "target=" . urlencode( $target->getPrefixedDBkey() );
- } else {
- return false;
- }
- }
-
function setBottomText( FormOptions $opts ) {
if( isset( $this->mResultEmpty ) && $this->mResultEmpty ) {
$this->getOutput()->addWikiMsg( 'recentchangeslinked-noresult' );