From: Brion Vibber Date: Thu, 10 Jul 2008 21:34:19 +0000 (+0000) Subject: Revert r37508 for now ((bug 14778) 'limit' parameter now applies to history feeds... X-Git-Tag: 1.31.0-rc.0~46558 X-Git-Url: http://git.cyclocoop.org//%22%22._DIR_PLUGIN_FULLCALENDAR.%22prive/themes/spip/images/event_edit.png/%22?a=commitdiff_plain;h=5fa0ff0627e1070d1447e7ecb40fe07036a74244;p=lhc%2Fweb%2Fwiklou.git Revert r37508 for now ((bug 14778) 'limit' parameter now applies to history feeds as well as history pages) The $limit parameter isn't validated properly as a limit, and is passed to the database producing an SQL error if negative. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5f01b30acd..6e894b7ac6 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -432,8 +432,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 14763) Child classes of Database (DatabasePostgres and DatabaseOracle) had stict standards issues with setFakeSlaveLag() and setFakeMaster(). * (bug 451) Improve the phrase mappings of the Chinese converter arrays. -* (bug 14778) 'limit' parameter now applies to history feeds as well as - history pages === API changes in 1.13 === diff --git a/includes/PageHistory.php b/includes/PageHistory.php index 7cd88919e1..08194413f8 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -501,7 +501,7 @@ class PageHistory { * @param string $type */ function feed( $type ) { - global $wgFeedClasses, $wgRequest, $wgFeedLimit; + global $wgFeedClasses; if ( !FeedUtils::checkFeedOutput($type) ) { return; } @@ -512,14 +512,7 @@ class PageHistory { wfMsgForContent( 'history-feed-description' ), $this->mTitle->getFullUrl( 'action=history' ) ); - // 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 = $wgFeedLimit; - } - $items = $this->fetchRevisions($limit, 0, PageHistory::DIR_NEXT); - + $items = $this->fetchRevisions(10, 0, PageHistory::DIR_NEXT); $feed->outHeader(); if( $items ) { foreach( $items as $row ) {