Commit 7bda07eb authored by Robert Lyon's avatar Robert Lyon Committed by Son Nguyen

Problems with image gallery and file/folder selection

Bug 1236128

Folder was not staying selected when re-editing the block
due to it being not ArtefactTypeFile - have adjusted the check to
include ArtefactTypeFolder as well

Change-Id: I9b8cbe786b0d35109f05a664f04665e9a9967d92
Signed-off-by: Aaron Wells's avatarAaron Wells <>
parent bd33b9c8
......@@ -102,7 +102,8 @@ function pieform_element_filebrowser(Pieform $form, $element) {
if (!empty($value)) {
foreach ($value as $k => $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)) {
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