aboutsummaryrefslogtreecommitdiff
path: root/model/Room.php
diff options
context:
space:
mode:
authordedeibel2017-12-10 18:02:48 +0100
committerdedeibel2017-12-10 18:27:05 +0100
commiteed207f8dfd68117715518c83fc32d3ae9e1e094 (patch)
treea130f34fc994223d6daebb4863024ca34f1dc977 /model/Room.php
parentbe515f5150f20c773371f680efad58f2d0fcaaf0 (diff)
Allowed multi translation for embedding, fixed autoplay option
Diffstat (limited to '')
-rw-r--r--model/Room.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/model/Room.php b/model/Room.php
index 56dab4c..27a8d97 100644
--- a/model/Room.php
+++ b/model/Room.php
@@ -337,9 +337,12 @@ class Room
throw new NotFoundException('Selection '.$selection.' in Room '.$this->getSlug());
$translation_label = null;
- if (substr($language, 0, strlen('native')) !== 'native') {
- if (!$this->hasTranslation()) {
- throw new NotFoundException('Translated Streams of Room '.$this->getSlug());
+ if ($language !== 'native' && $language !== 'stereo') {
+ if (! $this->hasTranslation()) {
+ throw new NotFoundException('Translated Streams of Room '. $this->getSlug());
+ }
+ if (! $this->isValidLanguage($language)) {
+ throw new NotFoundException('Selected translation');
}
$translation_label = $this->findTranslationLabel($language);