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