From fa864a5672f4dc23357c78c68874db0ffa4ae8cb Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 24 Oct 2012 12:27:39 +0200 Subject: [PATCH] Fixing removeUnusedFiles --- main/dropbox/dropbox_functions.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main/dropbox/dropbox_functions.inc.php b/main/dropbox/dropbox_functions.inc.php index 4d640f1db7..98508d052e 100644 --- a/main/dropbox/dropbox_functions.inc.php +++ b/main/dropbox/dropbox_functions.inc.php @@ -646,8 +646,10 @@ function removeUnusedFiles() { $sql = "SELECT DISTINCT f.id, f.filename FROM " . dropbox_cnf('tbl_file') . " f LEFT JOIN " . dropbox_cnf('tbl_person') . " p - ON (f.id = p.file_id AND f.c_id = $course_id AND p.c_id = $course_id ) - WHERE p.user_id IS NULL"; + ON (f.id = p.file_id) + WHERE p.user_id IS NULL AND + f.c_id = $course_id + "; $result = Database::query($sql); while ($res = Database::fetch_array($result)) {