Replace admin_write_settings to set_config

This commit is contained in:
Tomo Tsuyuki
2021-05-11 15:53:46 +10:00
parent 207223fc2d
commit a262467d58

View File

@@ -443,9 +443,7 @@ EOT;
$this->create_outage();
// Change settings.
admin_write_settings((object)[
's_auth_outage_allowedips' => '127',
]);
set_config('s_auth_outage_allowedips', '127', 'auth_outage');
// The method outagelib::prepare_next_outage() should have been called from admin_write_settings().
foreach ([$CFG->dataroot.'/climaintenance.template.html', $CFG->dataroot.'/climaintenance.php'] as $file) {
@@ -463,9 +461,7 @@ EOT;
$this->create_outage();
// Change settings.
admin_write_settings((object)[
's_auth_outage_remove_selectors' => '.something',
]);
set_config('s_auth_outage_remove_selectors', '.something', 'auth_outage');
// The method outagelib::prepare_next_outage() should have been called from admin_write_settings().
foreach ([$CFG->dataroot.'/climaintenance.template.html', $CFG->dataroot.'/climaintenance.php'] as $file) {