From 5aaf0ddeda5db1f06ac22f045048c640c58dfe77 Mon Sep 17 00:00:00 2001 From: adamlynam-catalyst <41096899+adamlynam-catalyst@users.noreply.github.com> Date: Wed, 3 Oct 2018 15:22:31 +1300 Subject: [PATCH] Adding check for use of ip restrictions before warning (#134) * Adding check for use of ip restrictions before warning about bootstrap.php not being included in config.php * Replacing reference to same class with self --- classes/local/outagelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/local/outagelib.php b/classes/local/outagelib.php index e579523..7472994 100644 --- a/classes/local/outagelib.php +++ b/classes/local/outagelib.php @@ -330,7 +330,7 @@ EOT; $message = []; - if (!isset($CFG->auth_outage_bootstrap_loaded) || !$CFG->auth_outage_bootstrap_loaded) { + if (trim(self::get_config()->allowedips) != '' && (!isset($CFG->auth_outage_bootstrap_loaded) || !$CFG->auth_outage_bootstrap_loaded)) { $message[] = get_string('configurationwarning', 'auth_outage'); }