}
}
+ /**
+ * Get the current limit
+ *
+ * @return int
+ */
+ function getLimit() {
+ return $this->mLimit;
+ }
+
/**
* Set whether a row matching exactly the offset should be also included
* in the result or not. By default this is not the case, but when the
public function execute() {
$params = $this->extractRequestParams();
- global $wgFeed, $wgFeedClasses, $wgSitename, $wgLanguageCode;
+ global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgSitename, $wgLanguageCode;
if ( !$wgFeed ) {
$this->dieUsage( 'Syndication feeds are not available', 'feed-unavailable' );
'showSizeDiff' => $params['showsizediff'],
) );
+ if ( $pager->getLimit() > $wgFeedLimit ) {
+ $pager->setLimit( $wgFeedLimit );
+ }
+
$feedItems = array();
if ( $pager->getNumRows() > 0 ) {
foreach ( $pager->mResult as $row ) {