Commit 77bc838d authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review

Merge "Problems with image gallery and file/folder selection Bug 1236128" into 1.6_STABLE

parents 092cb585 7bda07eb
...@@ -102,7 +102,8 @@ function pieform_element_filebrowser(Pieform $form, $element) { ...@@ -102,7 +102,8 @@ function pieform_element_filebrowser(Pieform $form, $element) {
if (!empty($value)) { if (!empty($value)) {
foreach ($value as $k => $v) { foreach ($value as $k => $v) {
$file = artefact_instance_from_id($v); $file = artefact_instance_from_id($v);
if (!($file instanceof ArtefactTypeFile) || !$USER->can_publish_artefact($file)) { if ((!($file instanceof ArtefactTypeFile) && !($file instanceof ArtefactTypeFolder))
|| !$USER->can_publish_artefact($file)) {
unset($value[$k]); unset($value[$k]);
} }
} }
......
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