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

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: default avatarRobert Lyon <robertl@catalyst.net.nz>
parent e498895d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
}