summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelle Sebreghts2012-08-30 13:59:53 (GMT)
committerJelle Sebreghts2012-08-30 14:00:21 (GMT)
commita03581046a82906c6b6c5024d14991f482bf1635 (patch)
tree040fb5f0f6017a448b046c4b79fa3154a12f09a3
parentcb615bd015ec26d8c01bae7e043b8ec9dae8a24f (diff)
Issue #1760666 by aitala: Fixed Issues with Media Gallery.
-rw-r--r--webform_multifile.module5
1 files changed, 3 insertions, 2 deletions
diff --git a/webform_multifile.module b/webform_multifile.module
index dcf163e..e01c16e 100644
--- a/webform_multifile.module
+++ b/webform_multifile.module
@@ -71,8 +71,9 @@ function webform_multifile_file_download($uri) {
// information, plus the user id of the uploader.
$target_document = db_select('file_managed', 'fm')->fields('fm')->condition('uri', $uri)->execute()->fetchObject();
$q = db_select('webform_submitted_data', 'wsd');
- $q->join('webform_component', 'wc', 'wsd.cid = wc.cid');
- $multifile_scan = $q->fields('wsd')->condition('wc.type', 'multifile', '=')->execute();
+ $q->join('webform_component', 'wc', 'wsd.cid = wc.cid AND wsd.nid = wc.nid');
+ $q->fields('wsd')->condition('wc.type', 'multifile', '=');
+ $multifile_scan = $q->execute();
$submission_id = $submission_uid = NULL;
while ($multifile_row = $multifile_scan->fetchAssoc()) {
$file_ids = unserialize($multifile_row['data']);