Commit 340687dd authored by Robert Lyon's avatar Robert Lyon

Bug 1827455: Add the file info to ClamAV admin email

Currently we only log it to screen / error log but not add it to
admin's email

behatnotneeded

Change-Id: I2c092050c5b0e330d6033508d811bdb6cc15c25d
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent e498895d
......@@ -280,8 +280,7 @@ function clam_handle_infected_file($file) {
$now = date('YmdHis');
$newname = $quarantinedir .'/'. $now .'-user-'. $userid .'-infected';
if (rename($file, $newname)) {
clam_log_infected($file, $newname);
return get_string('clammovedfile');
return clam_log_infected($file, $newname);
}
}
if (unlink($file)) {
......@@ -452,4 +451,5 @@ function clam_log_infected($oldfilepath='', $newfilepath='', $userid=0) {
. ((empty($newfilepath)) ? '. The file has been deleted ' : '. The file has been moved to a quarantine directory and the new path is '. $newfilepath);
log_debug($errorstr);
return $errorstr;
}
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