Index: trunk/phase3/includes/api/ApiQueryAllmessages.php |
— | — | @@ -74,11 +74,13 @@ |
75 | 75 | |
76 | 76 | //Get all requested messages |
77 | 77 | $messages = array(); |
| 78 | + $skip = !is_null($params['from']); |
78 | 79 | 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 ); |
83 | 85 | } |
84 | 86 | |
85 | 87 | //Print the result |