fix: use acronym instead of mandator to generate relive + voctoweb url

This commit is contained in:
Andreas Hubel 2024-01-14 22:26:28 +01:00
parent f2864cff00
commit 6f3fb8e154
No known key found for this signature in database
GPG key ID: 1291899EC534ECDE
2 changed files with 8 additions and 4 deletions

View file

@ -15,6 +15,10 @@ class Conference extends ModelBase
return $this->slug;
}
public function getAcronym() {
return $this->get('CONFERENCE.ACRONYM', $this->slug);
}
public function getTitle() {
return $this->get('CONFERENCE.TITLE', 'C3VOC');
}

View file

@ -46,8 +46,8 @@ class ConferenceJson extends Conference
else {
$groups['Live'] = array_keys((array) $this->rooms);
}
$acronym = $mandator ?: $c->acronym;
$acronym = $c->acronym ?: $mandator;
$config = array_merge(
isset($c->streamingConfig) ? get_object_vars($c->streamingConfig) : [],
@ -62,7 +62,7 @@ class ConferenceJson extends Conference
// future TODO: change structure
"relive_json" => "https://cdn.c3voc.de/relive/".$acronym."/index.json",
"releases" => "https://media.ccc.de/c/".$acronym,
],
],
// 'schedule' => (array) $c->streamingConfig->schedule
'rooms' => $this->rooms,
'overview' => [
@ -81,7 +81,7 @@ class ConferenceJson extends Conference
$config['conference']['releases'] = null;
}
parent::__construct($config, $acronym);
parent::__construct($config, $mandator);
}
public function has($keychain)