mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
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:
@@ -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',
|
||||
'*');
|
||||
|
||||
Reference in New Issue
Block a user