mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-02 19:39:39 +01:00
Api: Fix single custom field with ID = fieldname did not properly load value
This commit is contained in:
parent
3423e680b8
commit
6b870ec652
@ -195,8 +195,9 @@ class Customfields extends Transformer
|
|||||||
preg_match($preg = '/'.$this->attrs['prefix'].'([^\]]+)/',$form_name,$matches) && isset($fields[$name=$matches[1]]))
|
preg_match($preg = '/'.$this->attrs['prefix'].'([^\]]+)/',$form_name,$matches) && isset($fields[$name=$matches[1]]))
|
||||||
{
|
{
|
||||||
$fields = array($name => $fields[$name]);
|
$fields = array($name => $fields[$name]);
|
||||||
$value = array($this->attrs['prefix'].$name => $value);
|
$value = self::get_array(self::$request->content, $form_name, false, true);
|
||||||
$form_name = $this->attrs['prefix'].$name;
|
$fields[$name]['value'] = $value;
|
||||||
|
$form_name = $this->attrs['prefix'] . $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!is_array($fields)) $fields = array();
|
if(!is_array($fields)) $fields = array();
|
||||||
@ -267,7 +268,7 @@ class Customfields extends Transformer
|
|||||||
$widget = $this->_widget($fname, $field);
|
$widget = $this->_widget($fname, $field);
|
||||||
if(method_exists($widget, 'beforeSendToClient'))
|
if(method_exists($widget, 'beforeSendToClient'))
|
||||||
{
|
{
|
||||||
$widget->beforeSendToClient($this->id == self::GLOBAL_ID ? '' : $this->id, $expand);
|
$widget->beforeSendToClient($this->id == self::GLOBAL_ID ? '' : $form_name, $expand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user