From b17fa8f9c1c944f76e71567a0781680484d1b606 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 4 Nov 2020 13:58:03 -0500 Subject: [PATCH] Rename StartTime, EndTime in Events to StartDateTime and EndDateTime --- web/ajax/events.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/ajax/events.php b/web/ajax/events.php index bf4cbacdf..5d58a5a41 100644 --- a/web/ajax/events.php +++ b/web/ajax/events.php @@ -39,7 +39,7 @@ $search = isset($_REQUEST['search']) ? $_REQUEST['search'] : ''; $advsearch = isset($_REQUEST['advsearch']) ? json_decode($_REQUEST['advsearch'], JSON_OBJECT_AS_ARRAY) : array(); // Sort specifies the name of the column to sort on -$sort = 'StartTime'; +$sort = 'StartDateTime'; if ( isset($_REQUEST['sort']) ) { $sort = $_REQUEST['sort']; } @@ -133,7 +133,7 @@ function queryRequest($filter, $search, $advsearch, $sort, $offset, $order, $lim $table = 'Events'; // The names of the dB columns in the events table we are interested in - $columns = array('Id', 'MonitorId', 'StorageId', 'Name', 'Cause', 'StartTime', 'EndTime', 'Length', 'Frames', 'AlarmFrames', 'TotScore', 'AvgScore', 'MaxScore', 'Archived', 'Emailed', 'Notes', 'DiskSpace'); + $columns = array('Id', 'MonitorId', 'StorageId', 'Name', 'Cause', 'StartDateTime', 'EndDateTime', 'Length', 'Frames', 'AlarmFrames', 'TotScore', 'AvgScore', 'MaxScore', 'Archived', 'Emailed', 'Notes', 'DiskSpace'); // The names of columns shown in the event view that are NOT dB columns in the database $col_alt = array('Monitor', 'Storage'); @@ -212,8 +212,8 @@ function queryRequest($filter, $search, $advsearch, $sort, $offset, $order, $lim $row['Archived'] = $row['Archived'] ? translate('Yes') : translate('No'); $row['Emailed'] = $row['Emailed'] ? translate('Yes') : translate('No'); $row['Cause'] = validHtmlStr($row['Cause']); - $row['StartTime'] = strftime(STRF_FMT_DATETIME_SHORTER, strtotime($row['StartTime'])); - $row['EndTime'] = $row['EndTime'] ? strftime(STRF_FMT_DATETIME_SHORTER, strtotime($row['EndTime'])) : null; + $row['StartDateTime'] = strftime(STRF_FMT_DATETIME_SHORTER, strtotime($row['StartDateTime'])); + $row['EndDateTime'] = $row['EndDateTime'] ? strftime(STRF_FMT_DATETIME_SHORTER, strtotime($row['EndDateTime'])) : null; $row['Length'] = gmdate('H:i:s', $row['Length'] ); $row['Storage'] = ( $row['StorageId'] and isset($StorageById[$row['StorageId']]) ) ? $StorageById[$row['StorageId']]->Name() : 'Default'; $row['Notes'] = nl2br(htmlspecialchars($row['Notes']));