From 9f3dc1a1aa34eacbd9ecdd38f91b65b0933f8873 Mon Sep 17 00:00:00 2001 From: Vencislav Atanasov Date: Tue, 17 Oct 2023 00:45:48 +0300 Subject: [PATCH] Show the organisation of each speaker, if provided --- schedule/parse.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/schedule/parse.php b/schedule/parse.php index 1c37e00..766ec17 100644 --- a/schedule/parse.php +++ b/schedule/parse.php @@ -280,12 +280,14 @@ function parseData($config, $data) { $spk = []; foreach ($event['participant_user_ids'] as $uid) { - if (in_array($uid, $config['hidden_speakers']) || empty($data['speakers'][$uid])) { + if (in_array($uid, $config['hidden_speakers']) || empty($data['speakers'][$uid])) { continue; } - $name = $data['speakers'][$uid]['first_name'] . ' ' . $data['speakers'][$uid]['last_name']; - $spk[] = '' . $name . ''; + $speaker = $data['speakers'][$uid]; + $name = $speaker['first_name'] . ' ' . $speaker['last_name']; + $organisation = empty($speaker['organisation']) ? '' : (' /' . $speaker['organisation'] . '/'); + $spk[] = '' . $name . '' . $organisation; } $speakers = implode (', ', $spk);