r99095 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99094‎ | r99095 | r99096 >
Date:13:02, 6 October 2011
Author:reedy
Status:ok
Tags:
Comment:
Even though we're not giving a continue (though, it all should fit in), if we get a no from addValue(), we might aswell stop iterating over the results and attempting to push them in
Modified paths:
  • /trunk/extensions/Translate/api/ApiQueryMessageGroups.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/api/ApiQueryMessageGroups.php
@@ -35,8 +35,12 @@
3636 $a['class'] = get_class( $g );
3737 $a['exists'] = $g->exists();
3838
39 - // TODO: Evaluate $fit
 39+ // TODO: Add a continue?
4040 $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $a );
 41+ if ( !$fit ) {
 42+ // Even if we're not going to give a continue, no point carrying on if the result is full
 43+ break;
 44+ }
4145 }
4246
4347 $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'group' );

Status & tagging log