* (bug 451) Improve the phrase mappings of the Chinese converter arrays.
* (bug 12487) Rights log is not fully internationalized
* (bug 10837) Language variants no longer override other languages than base
+* (bug 14778) 'limit' parameter now applies to history feeds as well as
+ history pages
=== API changes in 1.13 ===
* @param string $type
*/
function feed( $type ) {
- global $wgFeedClasses;
+ global $wgFeedClasses, $wgRequest, $wgFeedLimit;
if ( !FeedUtils::checkFeedOutput($type) ) {
return;
}
wfMsgForContent( 'history-feed-description' ),
$this->mTitle->getFullUrl( 'action=history' ) );
- $items = $this->fetchRevisions(10, 0, PageHistory::DIR_NEXT);
+ // Get a limit on number of feed entries. Provide a sane default
+ // of 10 if none is defined (but limit to $wgFeedLimit max)
+ $limit = $wgRequest->getInt( 'limit', 10 );
+ if( $limit > $wgFeedLimit || $limit < 1 ) {
+ $limit = 10;
+ }
+ $items = $this->fetchRevisions($limit, 0, PageHistory::DIR_NEXT);
+
$feed->outHeader();
if( $items ) {
foreach( $items as $row ) {