diff --git a/classes/outagedb.php b/classes/outagedb.php index 5aee078..3990d9b 100644 --- a/classes/outagedb.php +++ b/classes/outagedb.php @@ -136,6 +136,14 @@ final class outagedb { $DB->delete_records('auth_outage', ['id' => $id]); } + /** + * Gets the most important active outage, considering importance as: + * - Ongoing outages more important than outages in warning period. + * - Outages that start earlier are more important. + * - Outages that stop later are more important. + * @param int|null $time Timestamp considered to check for outages, null for current date/time. + * @return outage|null The outage or null if no active outages were found. + */ public static function getactive($time = null) { global $DB; diff --git a/res/outage.css b/res/outage.css index 65ca782..54ee5f9 100644 --- a/res/outage.css +++ b/res/outage.css @@ -1,3 +1,3 @@ .auth_outage_warningbar { background-color: red; -} \ No newline at end of file +}