diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-20 00:55:30 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-20 00:55:30 +0000 |
commit | 0d2b7fe81b37ce2ccddca0d6bbd1aa276d20d82e (patch) | |
tree | fdca2c31435f098d88fb23a5b5a94ce912282327 /modules/upload | |
parent | eeb7b53ef6c2098a0e428f98dd578eaa78a1ed89 (diff) | |
download | brdo-0d2b7fe81b37ce2ccddca0d6bbd1aa276d20d82e.tar.gz brdo-0d2b7fe81b37ce2ccddca0d6bbd1aa276d20d82e.tar.bz2 |
- Patch #443200 by c960657: fixed user pictures not working with private files.
Diffstat (limited to 'modules/upload')
-rw-r--r-- | modules/upload/upload.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 391d064b3..5a0c0c1c5 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -150,8 +150,8 @@ function _upload_file_limits($user) { /** * Implement hook_file_download(). */ -function upload_file_download($filepath) { - $file = db_query("SELECT f.*, u.nid FROM {file} f INNER JOIN {upload} u ON f.fid = u.fid WHERE uri = :path", array(':path' => $filepath))->fetchObject(); +function upload_file_download($uri) { + $file = db_query("SELECT f.*, u.nid FROM {file} f INNER JOIN {upload} u ON f.fid = u.fid WHERE uri = :uri", array(':uri' => $uri))->fetchObject(); if ($file && user_access('view uploaded files') && ($node = node_load($file->nid)) && node_access('view', $node)) { return array( |