From edbe042ae6d517d466d8ee79bc134ccd61e22fa8 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 6 Nov 2012 10:19:09 +0100 Subject: [PATCH] Minor query correction see #5677 --- main/dropbox/dropbox_class.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main/dropbox/dropbox_class.inc.php b/main/dropbox/dropbox_class.inc.php index 5e22d474fe..a033f977e5 100644 --- a/main/dropbox/dropbox_class.inc.php +++ b/main/dropbox/dropbox_class.inc.php @@ -400,11 +400,11 @@ class Dropbox_Person // Find all entries where this person is the recipient $sql = "SELECT DISTINCT r.file_id, r.cat_id - FROM $post_tbl r INNER JOIN $person_tbl p - ON (r.dest_user_id = p.user_id AND r.c_id = $course_id AND p.c_id = $course_id ) + FROM $post_tbl r INNER JOIN $person_tbl p + ON (r.dest_user_id = p.user_id AND r.file_id= p.file_id AND r.c_id = $course_id AND p.c_id = $course_id ) WHERE - r.dest_user_id = ".intval($this->userId)." AND - r.file_id = p.file_id $condition_session "; + r.dest_user_id = ".intval($this->userId)." AND + $condition_session "; $result = Database::query($sql); while ($res = Database::fetch_array($result)) {