Skip to content

Commit

Permalink
Fix indention
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-meyer committed Oct 12, 2017
1 parent 9da98b0 commit 0b63eb6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions oai2server.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function GetRecord() {
$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->addMetadata($cur_record, $record['metadata']);
$this->addMetadata($cur_record, $record['metadata']);
}
} else {
$this->errors[] = new OAI2Exception('idDoesNotExist');
Expand Down Expand Up @@ -215,11 +215,11 @@ public function ListRecords() {
$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_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 headers will be returned.
$this->addMetadata($cur_record, $record['metadata']);
$this->addMetadata($cur_record, $record['metadata']);
}
}
// Will we need a new ResumptionToken?
Expand All @@ -242,10 +242,10 @@ public function ListRecords() {
}

private function addMetadata($cur_record, $file) {
$meta_node = $this->response->addChild($cur_record, 'metadata');
$fragment = new DOMDocument();
$fragment->load($file);
$this->response->importFragment($meta_node, $fragment);
$meta_node = $this->response->addChild($cur_record, 'metadata');
$fragment = new DOMDocument();
$fragment->load($file);
$this->response->importFragment($meta_node, $fragment);
}

private function createResumptionToken($delivered_records) {
Expand Down

0 comments on commit 0b63eb6

Please sign in to comment.