fix CF widget of type filemanager to NOT require filemanager run-rights

This commit is contained in:
ralf 2024-04-05 12:01:29 +02:00
parent 76d6f179c6
commit 2ac4c382b5

View File

@ -309,18 +309,14 @@ class Customfields extends Transformer
$link_types = Api\Link::app_list(); $link_types = Api\Link::app_list();
} }
$type = $field['type']; if (($type = $field['type']) === 'filemanager')
// Link-tos needs to change from appname to link-to
if(!empty($link_types[$field['type']]))
{ {
if($type == 'filemanager') $type = 'vfs-upload';
{ }
$type = 'vfs-upload'; // Link-tos needs to change from appname to link-to
} elseif(!empty($link_types[$type]))
else {
{ $type = 'link-to';
$type = 'link-to';
}
} }
$xml = '<' . $type . ' type="' . $type . '" id="' . self::$prefix . $fname . '" required="' . $field['needed'] . '"/>'; $xml = '<' . $type . ' type="' . $type . '" id="' . self::$prefix . $fname . '" required="' . $field['needed'] . '"/>';
$widget = self::factory($type, $xml, self::$prefix . $fname); $widget = self::factory($type, $xml, self::$prefix . $fname);