mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Fix validation of CF options from json file
This commit is contained in:
parent
d1c71c31fc
commit
f3258ebc45
@ -249,7 +249,6 @@ class Customfields extends Transformer
|
||||
$stat = Api\Vfs::stat($data['values']['@'])
|
||||
)
|
||||
{
|
||||
|
||||
$data['values']['@'] = $fields[$data['name']]['values']['@'] = Api\Framework::link(
|
||||
Api\Vfs::download_url($data['values']['@']),
|
||||
['download' => $stat['mtime']]
|
||||
@ -503,7 +502,9 @@ class Customfields extends Transformer
|
||||
// Here we need the options to validate
|
||||
if($widget instanceof Select && !empty($field_settings['values']['@']))
|
||||
{
|
||||
$options = Api\Storage\Customfields::get_options_from_file($field_settings['values']['@']);
|
||||
$file_bits = explode("/webdav.php", Api\Vfs::parse_url($field_settings['values']['@'], PHP_URL_PATH));
|
||||
$file = array_pop($file_bits);
|
||||
$options = Api\Storage\Customfields::get_options_from_file($file);
|
||||
// keep extra values set by app code, eg. addressbook advanced search
|
||||
if(!empty(self::$request->sel_options[self::$prefix . $fname]) && is_array(self::$request->sel_options[self::$prefix . $fname]))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user