Commit 18cd9c79 authored by Dries's avatar Dries
Browse files

- Patch #247095 by drewish: fixed variable name that cause private file uploads to be broken.

parent 8e60560b
......@@ -148,7 +148,7 @@ function _upload_file_limits($user) {
*/
function upload_file_download($filepath) {
$filepath = file_create_path($filepath);
$result = db_query("SELECT f.* FROM {files} f INNER JOIN {upload} u ON f.fid = u.fid WHERE filepath = '%s'", $file);
$result = db_query("SELECT f.* FROM {files} f INNER JOIN {upload} u ON f.fid = u.fid WHERE filepath = '%s'", $filepath);
if ($file = db_fetch_object($result)) {
if (!user_access('view uploaded files')) {
return -1;
......
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