mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-18 09:05:02 +00:00
Fix empty broadcast start time column (#7745)
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2026
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -122,7 +122,8 @@
|
||||
$sql .= "broadcast_description, broadcast_start_time, broadcast_timeout, ";
|
||||
$sql .= "broadcast_concurrent_limit, recording_uuid, broadcast_caller_id_name, ";
|
||||
$sql .= "broadcast_caller_id_number, broadcast_destination_type, broadcast_phone_numbers, ";
|
||||
$sql .= "broadcast_avmd, broadcast_destination_data, broadcast_accountcode, broadcast_toll_allow ";
|
||||
$sql .= "broadcast_avmd, broadcast_destination_data, broadcast_accountcode, broadcast_toll_allow, ";
|
||||
$sql .= "update_date, insert_date ";
|
||||
$sql .= "from v_call_broadcasts ";
|
||||
$sql .= "where true ";
|
||||
if ($show != "all" || !permission_exists('call_broadcast_all')) {
|
||||
@@ -255,11 +256,17 @@
|
||||
echo " </td>\n";
|
||||
echo " <td>".escape($row['broadcast_concurrent_limit'])."</td>\n";
|
||||
//determine start date and time
|
||||
$broadcast_start_reference = !empty($row['update_date']) ?: !empty($row['insert_date']);
|
||||
$broadcast_start_time = '';
|
||||
$broadcast_start_reference = !empty($row['update_date']) ? $row['update_date'] : $row['insert_date'];
|
||||
if ($row['broadcast_start_time'] && $broadcast_start_reference) {
|
||||
$broadcast_start_time = date('Y-m-d H:i', strtotime($broadcast_start_reference) + $row['broadcast_start_time']);
|
||||
if ($settings->get('domain', 'time_format') == '24h') {
|
||||
$broadcast_start_time = date('Y-m-d H:i', strtotime($broadcast_start_reference) + $row['broadcast_start_time']);
|
||||
}
|
||||
else {
|
||||
$broadcast_start_time = date('Y-m-d h:i A', strtotime($broadcast_start_reference) + $row['broadcast_start_time']);
|
||||
}
|
||||
}
|
||||
echo " <td>".escape($broadcast_start_time ?? '')."</td>\n";
|
||||
echo " <td>".escape($broadcast_start_time)."</td>\n";
|
||||
echo " <td class='description overflow hide-xs'>".escape($row['broadcast_description'])."</td>\n";
|
||||
if (permission_exists('call_broadcast_edit') && $list_row_edit_button) {
|
||||
echo " <td class='action-button'>";
|
||||
|
||||
Reference in New Issue
Block a user