Commit c6a7c77b authored by Hugh Davenport's avatar Hugh Davenport Committed by Gerrit Code Review
Browse files

Merge "Check image file exists in db (bug #992930)"

parents cda6ff9a c61c4423
...@@ -71,8 +71,8 @@ switch ($type) { ...@@ -71,8 +71,8 @@ switch ($type) {
} }
} }
if ($id) { if ($id && $fileid = get_field('artefact_file_files', 'fileid', 'artefact', $id)) {
if ($path = get_dataroot_image_path('artefact/file/profileicons', get_field('artefact_file_files', 'fileid', 'artefact', $id), $size)) { if ($path = get_dataroot_image_path('artefact/file/profileicons', $fileid, $size)) {
if ($mimetype) { if ($mimetype) {
header('Content-type: ' . $mimetype); header('Content-type: ' . $mimetype);
...@@ -192,4 +192,4 @@ function readfile_exit($path) { ...@@ -192,4 +192,4 @@ function readfile_exit($path) {
readfile($path); readfile($path);
perf_to_log(); perf_to_log();
exit; exit;
} }
\ No newline at end of file
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