Index: trunk/extensions/OAI/OAIRepo_body.php |
— | — | @@ -437,15 +437,15 @@ |
438 | 438 | function listRecords( $verb ) { |
439 | 439 | $withData = ($verb == 'ListRecords'); |
440 | 440 | |
441 | | - $token = $this->validateToken( 'resumptionToken' ); |
| 441 | + $startToken = $this->validateToken( 'resumptionToken' ); |
442 | 442 | if( $this->errorCondition() ) { |
443 | 443 | return; |
444 | 444 | } |
445 | | - if( $token ) { |
446 | | - $metadataPrefix = $token['metadataPrefix']; |
447 | | - $resume = $token['resume']; |
| 445 | + if( $startToken ) { |
| 446 | + $metadataPrefix = $startToken['metadataPrefix']; |
| 447 | + $resume = $startToken['resume']; |
448 | 448 | $from = null; |
449 | | - $until = $token['until']; |
| 449 | + $until = $startToken['until']; |
450 | 450 | } else { |
451 | 451 | $metadataPrefix = $this->validateMetadata( 'metadataPrefix' ); |
452 | 452 | $resume = null; |
— | — | @@ -475,9 +475,9 @@ |
476 | 476 | if( $row = $resultSet->fetchObject() ) { |
477 | 477 | $limit = wfTimestamp( TS_MW, $until ); |
478 | 478 | if( $until ) |
479 | | - $token = "$metadataPrefix:$row->up_sequence:$limit"; |
| 479 | + $nextToken = "$metadataPrefix:$row->up_sequence:$limit"; |
480 | 480 | else |
481 | | - $token = "$metadataPrefix:$row->up_sequence"; |
| 481 | + $nextToken = "$metadataPrefix:$row->up_sequence"; |
482 | 482 | } |
483 | 483 | $resultSet->free(); |
484 | 484 | // init writer |
— | — | @@ -491,8 +491,8 @@ |
492 | 492 | echo $item->renderHeader( $this->timeGranularity() ); |
493 | 493 | } |
494 | 494 | } |
495 | | - if( isset($token) ) { |
496 | | - echo oaiTag( 'resumptionToken', array(), $token ) . "\n"; |
| 495 | + if( isset( $nextToken ) ) { |
| 496 | + echo oaiTag( 'resumptionToken', array(), $nextToken ) . "\n"; |
497 | 497 | } |
498 | 498 | echo "</$verb>\n"; |
499 | 499 | } else { |