From d0c4a1c0befd58e50f1bc0b954950d97981da3c7 Mon Sep 17 00:00:00 2001 From: Daniel Thee Roperto Date: Tue, 6 Sep 2016 14:11:10 +1000 Subject: [PATCH] Issue #9 - Added missing method phpdocs --- classes/outagedb.php | 8 ++++++++ res/outage.css | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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 +}