try {
$params = $this->extractRequestParams();
- if( !$wgFeed ) {
+ if ( !$wgFeed ) {
$this->dieUsage( 'Syndication feeds are not available', 'feed-unavailable' );
}
- if( !isset( $wgFeedClasses[$params['feedformat']] ) ) {
+ if ( !isset( $wgFeedClasses[$params['feedformat']] ) ) {
$this->dieUsage( 'Invalid subscription feed type', 'feed-invalid' );
}
'wlprop' => 'title|user|comment|timestamp',
'wldir' => 'older', // reverse order - from newest to oldest
'wlend' => $endTime, // stop at this time
- 'wllimit' => ( 50 > $wgFeedLimit ) ? $wgFeedLimit : 50
+ 'wllimit' => min( 50, $wgFeedLimit )
);
if ( $params['wlowner'] !== null ) {
if ( $params['wlshow'] !== null ) {
$fauxReqArr['wlshow'] = $params['wlshow'];
}
+ if ( $params['wltype'] !== null ) {
+ $fauxReqArr['wltype'] = $params['wltype'];
+ }
// Support linking to diffs instead of article
if ( $params['linktodiffs'] ) {
$ret['wlowner'] = $wlparams['owner'];
$ret['wltoken'] = $wlparams['token'];
$ret['wlshow'] = $wlparams['show'];
+ $ret['wltype'] = $wlparams['type'];
$ret['wlexcludeuser'] = $wlparams['excludeuser'];
} else {
$ret['allrev'] = null;
$ret['wlowner'] = null;
$ret['wltoken'] = null;
$ret['wlshow'] = null;
+ $ret['wltype'] = null;
$ret['wlexcludeuser'] = null;
}
return $ret;
'wlowner' => $wldescr['owner'],
'wltoken' => $wldescr['token'],
'wlshow' => $wldescr['show'],
+ 'wltype' => $wldescr['type'],
'wlexcludeuser' => $wldescr['excludeuser'],
);
}