Commit 9ad21e18 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Set viruschecking to 0/1 rather than off/on in db

parent 757596da
...@@ -113,7 +113,7 @@ function siteoptions_fail($field) { ...@@ -113,7 +113,7 @@ function siteoptions_fail($field) {
exit; exit;
} }
function siteoptions_submit($values) { function siteoptions_submit($values) {
$fields = array('language','theme','viruschecking','pathtoclam', $fields = array('language','theme','pathtoclam',
'allowpublicviews','artefactviewinactivitytime', 'allowpublicviews','artefactviewinactivitytime',
'contactaddress'); 'contactaddress');
foreach ($fields as $field) { foreach ($fields as $field) {
...@@ -124,6 +124,9 @@ function siteoptions_submit($values) { ...@@ -124,6 +124,9 @@ function siteoptions_submit($values) {
if (!set_config('session_timeout', $values['sessionlifetime'] * 60)) { if (!set_config('session_timeout', $values['sessionlifetime'] * 60)) {
siteoptions_fail($field); siteoptions_fail($field);
} }
if (!set_config('viruschecking', (int) ($values['viruschecking'] == 'on'))) {
siteoptions_fail($field);
}
$result['error'] = false; $result['error'] = false;
$result['message'] = get_string('siteoptionsset'); $result['message'] = get_string('siteoptionsset');
error_log($result['message']); error_log($result['message']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment