Skip to content

Commit 267541b

Browse files
committed
Merge branch 'develop' into 2.1
2 parents 4828c06 + 875c762 commit 267541b

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

lib/CultureFeed/Cdb/Data/Calendar/OpeningTime.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,11 @@ public static function parseFromCdbXml(SimpleXMLElement $xmlElement)
102102

103103
$attributes = $xmlElement->attributes();
104104
if (!isset($attributes['from'])) {
105-
throw new CultureFeed_Cdb_ParseException(
106-
"Required attribute 'from' is missing on openingtime"
107-
);
105+
$openFrom = '00:00:00';
106+
} else {
107+
$openFrom = (string) $attributes['from'];
108108
}
109109

110-
$openFrom = (string) $attributes['from'];
111-
112110
$openTill = null;
113111
if (isset($attributes['to'])) {
114112
$openTill = (string) $attributes['to'];

lib/CultureFeed/Cdb/Data/Category.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class CultureFeed_Cdb_Data_Category implements CultureFeed_Cdb_IElement
2222
*/
2323
const CATEGORY_TYPE_TARGET_AUDIANCE = 'targetaudience';
2424
const CATEGORY_TYPE_FLANDERS_REGION = 'flandersregion';
25+
const CATEGORY_TYPE_UMV = 'umv';
2526

2627
/**
2728
* Type of category.

lib/CultureFeed/Cdb/Item/Actor.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,22 @@ public function appendToDOM(DOMElement $element, $cdbScheme = '3.2')
172172
}
173173

174174
if (count($this->keywords) > 0) {
175-
$keywordElement = $dom->createElement('keywords');
176-
$keywordElement->appendChild(
177-
$dom->createTextNode(implode(';', $this->keywords))
178-
);
179-
$actorElement->appendChild($keywordElement);
175+
$keywordsElement = $dom->createElement('keywords');
176+
if (version_compare($cdbScheme, '3.3', '>=')) {
177+
foreach ($this->keywords as $keyword) {
178+
$keyword->appendToDOM($keywordsElement);
179+
}
180+
$actorElement->appendChild($keywordsElement);
181+
} else {
182+
$keywords = array();
183+
foreach ($this->keywords as $keyword) {
184+
$keywords[$keyword->getValue()] = $keyword->getValue();
185+
}
186+
$keywordsElement->appendChild(
187+
$dom->createTextNode(implode(';', $keywords))
188+
);
189+
$actorElement->appendChild($keywordsElement);
190+
}
180191
}
181192

182193
if ($this->weekScheme) {

0 commit comments

Comments
 (0)