Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
5c9c4028
Commit
5c9c4028
authored
Feb 12, 2008
by
Richard Mansfield
Browse files
Remove postgres-specific code from virus checking (bug 1873)
parent
2911d50b
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/lib/uploadmanager.php
View file @
5c9c4028
...
@@ -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
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment