Commit 0181022c authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Check clam path on site options page when virus checking is on (bug 3335)

parent 81adc3f8
......@@ -229,6 +229,16 @@ function siteoptions_submit(Pieform $form, $values) {
}
}
if ($values['viruschecking'] == 'on') {
$pathtoclam = escapeshellcmd(trim(get_config('pathtoclam')));
if (!$pathtoclam || !file_exists($pathtoclam) && !is_executable($pathtoclam)) {
$form->reply(PIEFORM_ERR, array(
'message' => get_string('clamlost', 'mahara', $pathtoclam),
'goto' => '/admin/site/options.php',
));
}
}
$message = get_string('siteoptionsset', 'admin');
if ($oldtheme != $values['theme']) {
$message .= ' ' . get_string('usersseenewthemeonlogin', 'admin');
......
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