Adds conference duration to front page widgets

main
Yasen Pramatarov 2024-07-10 15:55:16 +03:00
parent 2496d3fc93
commit 38e15c8cf6
1 changed files with 16 additions and 0 deletions

View File

@ -34,11 +34,19 @@ try {
foreach ($search as $item) { foreach ($search as $item) {
extract($item); extract($item);
// we don't have duration field, so we calculate it
if (!empty($start) && !empty($end)) {
$duration = gmdate("H:i:s", abs(strtotime($end) - strtotime($start)));
} else {
$duration = '';
}
$conference_record = array( $conference_record = array(
// assign title to the field in the array record // assign title to the field in the array record
'component' => $jitsi_component, 'component' => $jitsi_component,
'start' => $start, 'start' => $start,
'end' => $end, 'end' => $end,
'duration' => $duration,
'conference ID' => $conference_id, 'conference ID' => $conference_id,
'conference name' => $conference_name, 'conference name' => $conference_name,
'participants' => $participants, 'participants' => $participants,
@ -133,11 +141,19 @@ try {
$i = 0; $i = 0;
foreach ($search as $item) { foreach ($search as $item) {
extract($item); extract($item);
// we don't have duration field, so we calculate it
if (!empty($start) && !empty($end)) {
$duration = gmdate("H:i:s", abs(strtotime($end) - strtotime($start)));
} else {
$duration = '';
}
$conference_record = array( $conference_record = array(
// assign title to the field in the array record // assign title to the field in the array record
'component' => $jitsi_component, 'component' => $jitsi_component,
'start' => $start, 'start' => $start,
'end' => $end, 'end' => $end,
'duration' => $duration,
'conference ID' => $conference_id, 'conference ID' => $conference_id,
'conference name' => $conference_name, 'conference name' => $conference_name,
'participants' => $participants, 'participants' => $participants,