Closed (fixed)
Project:
Webform
Version:
7.x-3.16
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2012 at 16:23 UTC
Updated:
14 Mar 2012 at 22:40 UTC
Downloading private files form submissions doesn't work properly.
webform_file_download checks whether $file->sid is empty and then uses $row->sid to load the submission.
Below code fixes this problem:
@@ -1003,7 +1003,7 @@ function webform_file_download($uri) {
if ($row) {
$file = file_load($row->fid);
}
- if (!empty($file->sid)) {
+ if (!empty($row->sid)) {
$submissions = webform_get_submissions(array('sid' => $row->sid));
$submission = reset($submissions);
}
Comments
Comment #1
quicksketchYikes, thanks @dirkgomez. Not sure how that passed my testing.
Comment #2
quicksketchThanks, committed your change to the D7 branch.