Skip to content

Commit

Permalink
Merge remote-tracking branch 'composer/feature/UIV-1664' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
lukdens committed Feb 16, 2016
2 parents 88d7f9c + 3bf3246 commit 875c762
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions lib/CultureFeed/Cdb/Item/Actor.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,22 @@ public function appendToDOM(DOMElement $element, $cdbScheme = '3.2')
}

if (count($this->keywords) > 0) {
$keywordElement = $dom->createElement('keywords');
$keywordElement->appendChild(
$dom->createTextNode(implode(';', $this->keywords))
);
$actorElement->appendChild($keywordElement);
$keywordsElement = $dom->createElement('keywords');
if (version_compare($cdbScheme, '3.3', '>=')) {
foreach ($this->keywords as $keyword) {
$keyword->appendToDOM($keywordsElement);
}
$actorElement->appendChild($keywordsElement);
} else {
$keywords = array();
foreach ($this->keywords as $keyword) {
$keywords[$keyword->getValue()] = $keyword->getValue();
}
$keywordsElement->appendChild(
$dom->createTextNode(implode(';', $keywords))
);
$actorElement->appendChild($keywordsElement);
}
}

if ($this->weekScheme) {
Expand Down

0 comments on commit 875c762

Please sign in to comment.