mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Use the time_format default setting on more pages (#7663)
* Use the time_format default setting on more pages * Update call_recordings.php * Update devices.php * Update email_queue.php * Update emergency.php * Update time formatting based on settings * Update fax_logs.php * Update fax_queue.php * Update time_condition_edit.php * Update xml_cdr_details.php * Update xml_cdr_search.php * Update xml_cdr_statistics_inc.php * Update xml_cdr_statistics.php * Update xml_cdr.php * Update contact_edit.php * Update contact_notes_view.php * Update contact_notes.php * Update contact_timer.php * Update contact_times.php * Update user_logs.php * Update footer.php * Update template.php * Update fax_files.php * Update recent_calls.php * Update missed_calls.php * Update recordings.php * Update xml_cdr_statistics_inc.php * Update xml_cdr_inc.php * Update xml_cdr_inc.php * Update recordings.php * Update missed_calls.php * Update call_block.php * Update user_logs.php * Update xml_cdr_inc.php * Update xml_cdr_details.php * Update recordings.php * Update fax_queue.php * Update fax_logs.php * Update fax_files.php * Update event_guard_logs.php * Update emergency.php * Update email_queue.php * Update devices.php * Update call_recordings.php * Update time_condition_edit.php * Update time_condition_edit.php * Update call_block.php * Update call_recordings.php * Update devices.php * Update email_queue.php * Update emergency.php * Update event_guard_logs.php * Update fax_files.php * Update fax_logs.php * Update fax_queue.php * Update recordings.php * Update xml_cdr_inc.php * Update user_logs.php * Update destination_summary.php * Update xml_cdr_extension_summary.php * Update music_on_hold.php * Update fax_send.php * Update voicemail_greetings.php * Update voicemail_greetings.php * Update xml_cdr_inc.php * Update xml_cdr_inc.php * Update xml_cdr_inc.php * Update xml_cdr_statistics_inc.php * Update xml_cdr_statistics_inc.php * Update xml_cdr_inc.php * Update xml_cdr_extension_summary.php * Update destination_summary.php * Update xml_cdr_statistics_inc.php * Update xml_cdr_inc.php * Update xml_cdr_statistics_inc.php * Update contact_edit.php * Update css.php * Update template.php * Update fax_send.php
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) 2018-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2018-2025
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -93,22 +93,29 @@
|
||||
$search = strtolower($_GET["search"]);
|
||||
}
|
||||
|
||||
//set the time zone
|
||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
||||
$parameters['time_zone'] = $time_zone;
|
||||
|
||||
//prepare some of the paging values
|
||||
$rows_per_page = $settings->get('domain', 'paging', 50);
|
||||
$page = $_GET['page'] ?? '';
|
||||
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//set the time zone
|
||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
||||
|
||||
//set the time format options: 12h, 24h
|
||||
if ($settings->get('domain', 'time_format') == '24h') {
|
||||
$time_format = 'HH24:MI:SS';
|
||||
}
|
||||
else {
|
||||
$time_format = 'HH12:MI:SS am';
|
||||
}
|
||||
|
||||
//get the list
|
||||
$sql = "select r.domain_uuid, d.domain_name, r.call_recording_uuid, r.call_direction, ";
|
||||
$sql .= "r.call_recording_name, r.call_recording_path, r.call_recording_transcription, r.call_recording_length, ";
|
||||
$sql .= "r.caller_id_name, r.caller_id_number, r.caller_destination, r.destination_number, ";
|
||||
$sql .= "to_char(timezone(:time_zone, r.call_recording_date), 'DD Mon YYYY') as call_recording_date_formatted, \n";
|
||||
$sql .= "to_char(timezone(:time_zone, r.call_recording_date), 'HH12:MI:SS am') as call_recording_time_formatted \n";
|
||||
$sql .= "to_char(timezone(:time_zone, r.call_recording_date), '".$time_format."') as call_recording_time_formatted \n";
|
||||
$sql .= "from view_call_recordings as r, v_domains as d ";
|
||||
//$sql .= "from v_call_recordings as r, v_domains as d ";
|
||||
$sql .= "where true ";
|
||||
@@ -131,6 +138,7 @@
|
||||
}
|
||||
$sql .= order_by($order_by, $order, 'r.call_recording_date', 'desc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$parameters['time_zone'] = $time_zone;
|
||||
$call_recordings = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user