Fix bug in ListIdentifiers

This commit is contained in:
Sebastian Meyer 2017-10-12 10:14:05 +02:00
parent b2861398aa
commit 9da98b041e
1 changed files with 4 additions and 2 deletions

View File

@ -214,9 +214,11 @@ class OAI2Server {
}
$records = call_user_func($this->listRecordsCallback, $metadataPrefix, $this->formatTimestamp($from), $this->formatTimestamp($until), false, $deliveredRecords, $maxItems);
foreach ($records as $record) {
if ($this->verb == 'ListRecords') { // for ListIdentifiers, only headers will be returned.
$cur_record = $this->response->addToVerbNode('record');
}
$cur_header = $this->response->createHeader($record['identifier'], $this->formatDatestamp($record['timestamp']), $record['deleted'], $cur_record);
if (!$record['deleted'] && $this->verb == 'ListRecords') { // for ListIdentifiers, only identifiers will be returned.
if (!$record['deleted'] && $this->verb == 'ListRecords') { // for ListIdentifiers, only headers will be returned.
$this->addMetadata($cur_record, $record['metadata']);
}
}