http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99764
Revision: 99764
Author: nikerabbit
Date: 2011-10-14 12:55:32 +0000 (Fri, 14 Oct 2011)
Log Message:
-----------
Followup r99762 - no point adding continue tag if offset is not handled :)
Modified Paths:
--------------
trunk/extensions/Translate/api/ApiQueryMessageTranslations.php
Modified: trunk/extensions/Translate/api/ApiQueryMessageTranslations.php
===================================================================
--- trunk/extensions/Translate/api/ApiQueryMessageTranslations.php
2011-10-14 12:30:46 UTC (rev 99763)
+++ trunk/extensions/Translate/api/ApiQueryMessageTranslations.php
2011-10-14 12:55:32 UTC (rev 99764)
@@ -66,6 +66,9 @@
$count = 0;
foreach ( $pageInfo as $key => $info ) {
+ if ( ++$count <= $params['offset'] ) {
+ continue;
+ }
$tTitle = Title::makeTitle( $namespace, $key );
$tHandle = new MessageHandle( $tTitle );
@@ -87,7 +90,7 @@
$fit = $result->addValue( array( 'query',
$this->getModuleName() ), null, $data );
if ( !$fit ) {
- $this->setContinueEnumParameter( 'offset',
$params['offset'] + $count - 1 );
+ $this->setContinueEnumParameter( 'offset',
$count );
break;
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs