From 23b14e29257e9557e0ff4331f725908ece9eca11 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Tue, 7 May 2024 18:19:49 +0200 Subject: [PATCH] ConferenceJson: fix some defaults --- configs/conferences/jugendhackt/config.json | 2 -- model/ConferenceJson.php | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/configs/conferences/jugendhackt/config.json b/configs/conferences/jugendhackt/config.json index 3a491592..189a05d2 100644 --- a/configs/conferences/jugendhackt/config.json +++ b/configs/conferences/jugendhackt/config.json @@ -1,10 +1,8 @@ { "$schema": "../../../docs/config-schema.json", "conference": { - "acronym": "jugendhackt", "description": "Jugend hackt Live Streaming, 2024 edition", "end": "2024-06-20T18:00:00+02:00", - "keywords": [], "organizer": "Jugend hackt", "start": "2024-05-18T12:00:00+02:00", "title": "Jugend hackt Frankfurt am Main 2024", diff --git a/model/ConferenceJson.php b/model/ConferenceJson.php index 7c6955de..d388a97a 100644 --- a/model/ConferenceJson.php +++ b/model/ConferenceJson.php @@ -49,7 +49,7 @@ class ConferenceJson extends Conference $groups['Live'] = array_keys((array) $this->rooms); } - $acronym = $c->acronym ?: $mandator; + $acronym = isset($c->acronym) ? $c->acronym : $mandator; $config = array_merge( isset($c->streamingConfig) ? get_object_vars($c->streamingConfig) : [], @@ -61,7 +61,7 @@ class ConferenceJson extends Conference 'title' => $c->title, 'author' => $c->organizer, 'description' => $c->description, - 'keywords' => is_array($c->keywords) ? implode(', ', $c->keywords) : "", + 'keywords' => isset($c->keywords) ? (is_array($c->keywords) ? implode(', ', $c->keywords) : "") : "", // future TODO: change structure "relive_json" => "https://cdn.c3voc.de/relive/".$acronym."/index.json", "releases" => "https://media.ccc.de/c/".$acronym,