r37536 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37535‎ | r37536 | r37537 >
Date:21:34, 10 July 2008
Author:brion
Status:old
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/PageHistory.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/PageHistory.php
@@ -501,7 +501,7 @@
502502 * @param string $type
503503 */
504504 function feed( $type ) {
505 - global $wgFeedClasses, $wgRequest, $wgFeedLimit;
 505+ global $wgFeedClasses;
506506 if ( !FeedUtils::checkFeedOutput($type) ) {
507507 return;
508508 }
@@ -512,14 +512,7 @@
513513 wfMsgForContent( 'history-feed-description' ),
514514 $this->mTitle->getFullUrl( 'action=history' ) );
515515
516 - // Get a limit on number of feed entries. Provide a sane default
517 - // of 10 if none is defined (but limit to $wgFeedLimit max)
518 - $limit = $wgRequest->getInt( 'limit', 10 );
519 - if( $limit > $wgFeedLimit ) {
520 - $limit = $wgFeedLimit;
521 - }
522 - $items = $this->fetchRevisions($limit, 0, PageHistory::DIR_NEXT);
523 -
 516+ $items = $this->fetchRevisions(10, 0, PageHistory::DIR_NEXT);
524517 $feed->outHeader();
525518 if( $items ) {
526519 foreach( $items as $row ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -432,8 +432,6 @@
433433 * (bug 14763) Child classes of Database (DatabasePostgres and DatabaseOracle)
434434 had stict standards issues with setFakeSlaveLag() and setFakeMaster().
435435 * (bug 451) Improve the phrase mappings of the Chinese converter arrays.
436 -* (bug 14778) 'limit' parameter now applies to history feeds as well as
437 - history pages
438436
439437 === API changes in 1.13 ===
440438

Follow-up revisions

RevisionCommit summaryAuthorDate
r37699(bug 14778) 'limit' parameter now applies to history feeds as well as history...demon16:00, 15 July 2008

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r37508(bug 14778) 'limit' parameter now applies to history feeds as well as history...demon14:53, 10 July 2008

Status & tagging log