--- a/server/src/app/Libraries/Transcript/TranscriberTranscriptConverter.php Sat Dec 17 23:43:28 2016 +0100
+++ b/server/src/app/Libraries/Transcript/TranscriberTranscriptConverter.php Sun Dec 18 01:13:51 2016 +0100
@@ -170,12 +170,14 @@
'id' => $this->document->getId()."_sctn".sprintf("%03d", $sectionIndex+1),
'items' => $sectionItems,
'meta' => [
- 'corpus:topic'=> ["id-ref" => $this->topicIds[$sectionNode->getAttribute('topic')]],
'corpus:begin' => floatval($sectionNode->getAttribute('startTime'))*1000,
'corpus:end' => floatval($sectionNode->getAttribute('endTime'))*1000,
]
];
-
+ $topicRef = $sectionNode->getAttribute('topic');
+ if(!empty($topicRef) && array_key_exists($topicRef, $this->topicIds)) {
+ $section['meta']['corpus:topic'] = ["id-ref" => $this->topicIds[$topicRef]];
+ }
array_push($this->lists, $section);
}
}