Issue #73 - Could not reproduce the issue but this fix should work.

- Added a fixed timestamp to get both planned/past outages, unlikely to happen outsite debugging environment but it could have a timing problem when fetching each list of outages.

- Changed the query to get ended queries to be a the conditions of NOT a past outage. I believe the old query was equivalent but that should rule out a query problem.
This commit is contained in:
Daniel Thee Roperto
2016-11-08 11:56:11 +11:00
parent 54c43d2508
commit deb6d87e72
2 changed files with 6 additions and 3 deletions

View File

@@ -256,7 +256,7 @@ class outagedb {
$rs = $DB->get_recordset_select(
'auth_outage',
':datetime1 >= stoptime OR (finished IS NOT NULL AND :datetime2 >= finished)',
'NOT (:datetime1 < stoptime AND (finished IS NULL OR :datetime2 < finished))',
['datetime1' => $time, 'datetime2' => $time],
'stoptime DESC, starttime DESC, title ASC',
'*');