Issue #38 - Ensuring we always have default values for plugin config.

This commit is contained in:
Daniel Thee Roperto
2016-09-19 15:05:20 +10:00
parent f569157368
commit 671e7d5f67
5 changed files with 60 additions and 34 deletions

View File

@@ -41,7 +41,7 @@ if ($mform->is_cancelled()) {
redirect('/auth/outage/manage.php#auth_outage_id_' . $id);
}
$config = get_config('auth_outage');
$config = outagelib::get_config();
$defaults = new outage([
'starttime' => time(),
'stoptime' => time() + ($config->default_duration * 60),