Commit 3fe49d15 authored by dsnopek's avatar dsnopek Committed by dsnopek

Issue #2943030 by dsnopek, tatarbj: [filefield_sources] Add D6 patch for SA-CONTRIB-2018-007

parent b3457c75
diff --git a/sources/reference.inc b/sources/reference.inc
index 21c5a53..387a06d 100644
--- a/sources/reference.inc
+++ b/sources/reference.inc
@@ -169,7 +169,9 @@ function filefield_source_reference_autocomplete($type_name, $field_name, $filen
if (!empty($field)) {
$files = filefield_source_reference_get_files($filename, $field);
foreach ($files as $fid => $file) {
- $items[$file->filename ." [fid:$fid]"] = theme('filefield_source_reference_autocomplete_item', $file);
+ if (filefield_sources_file_access($file->filepath)) {
+ $items[$file->filename . " [fid:$fid]"] = theme('filefield_source_reference_autocomplete_item', $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