Commit 5c9c4028 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Remove postgres-specific code from virus checking (bug 1873)

parent 2911d50b
...@@ -290,8 +290,12 @@ function clam_scan_file(&$file) { ...@@ -290,8 +290,12 @@ function clam_scan_file(&$file) {
clam_handle_infected_file($fullpath); clam_handle_infected_file($fullpath);
// Notify admins if user has uploaded more than 3 infected // Notify admins if user has uploaded more than 3 infected
// files in the last month // files in the last month
if (count_records_sql('SELECT COUNT(*) FROM {usr_infectedupload} if (count_records_sql('
WHERE usr = ? AND time > CURRENT_TIMESTAMP - ?::INTERVAL;', array($userid, '1 month')) >= 2) { SELECT
COUNT(*)
FROM {usr_infectedupload}
WHERE usr = ? AND time > ?',
array($userid, db_format_timestamp(time() - 60*60*24*30))) >= 2) {
log_debug('sending virusrepeat notification'); log_debug('sending virusrepeat notification');
$data = (object) array('username' => $USER->get('username'), $data = (object) array('username' => $USER->get('username'),
'userid' => $userid, 'userid' => $userid,
......
Supports Markdown
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