r47048 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47047‎ | r47048 | r47049 >
Date:19:24, 9 February 2009
Author:catrope
Status:deferred (Comments)
Tags:
Comment:
Fix up r47037, which was itself a fix-up of r46845. Change suggested by Brad Jorsch
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryAllmessages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryAllmessages.php
@@ -74,11 +74,13 @@
7575
7676 //Get all requested messages
7777 $messages = array();
 78+ $skip = !is_null($params['from']);
7879 foreach( $messages_target as $message ) {
79 - if(!is_null($params['from']))
80 - if($message != $params['from'])
81 - continue;
82 - $messages[$message] = wfMsg( $message );
 80+ // Skip all messages up to $params['from']
 81+ if($skip && $message === $params['from'])
 82+ $skip = false;
 83+ if(!$skip)
 84+ $messages[$message] = wfMsg( $message );
8385 }
8486
8587 //Print the result

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r46845* API: BREAKING CHANGE: (bug 11430) Return fewer results than the limit in so...catrope14:30, 5 February 2009
r47037API: Fix up r46825:...catrope14:07, 9 February 2009

Comments

#Comment by Catrope (talk | contribs)   17:51, 16 February 2009

"Fix up r47037" should be r47036

Status & tagging log