mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 00:43:20 +01:00
Fix validation of CF options from json file
This commit is contained in:
parent
b304be3a20
commit
81a6c13010
@ -249,7 +249,6 @@ class Customfields extends Transformer
|
|||||||
$stat = Api\Vfs::stat($data['values']['@'])
|
$stat = Api\Vfs::stat($data['values']['@'])
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
$data['values']['@'] = $fields[$data['name']]['values']['@'] = Api\Framework::link(
|
$data['values']['@'] = $fields[$data['name']]['values']['@'] = Api\Framework::link(
|
||||||
Api\Vfs::download_url($data['values']['@']),
|
Api\Vfs::download_url($data['values']['@']),
|
||||||
['download' => $stat['mtime']]
|
['download' => $stat['mtime']]
|
||||||
@ -503,7 +502,9 @@ class Customfields extends Transformer
|
|||||||
// Here we need the options to validate
|
// Here we need the options to validate
|
||||||
if($widget instanceof Select && !empty($field_settings['values']['@']))
|
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
|
// 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]))
|
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