Commit a0358104 authored by Jelle_S's avatar Jelle_S

Issue #1760666 by aitala: Fixed Issues with Media Gallery.

parent cb615bd0
......@@ -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']);
......
Markdown is supported
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