mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-09 07:28:43 +01:00
Fix complex name finding to handle select options with label & value set, not just simple key => values
This commit is contained in:
parent
2dd71574b4
commit
cb902a3219
@ -439,15 +439,20 @@ class Select extends Etemplate\Widget
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for non-trivial name like a[b]
|
// Check for non-trivial name like a[b]
|
||||||
|
$name_parts = explode('[',str_replace(array('[',']',']'),array('['),$name));
|
||||||
if(!$options)
|
if(!$options)
|
||||||
{
|
{
|
||||||
$options = (array)self::get_array(self::$request->sel_options,$name);
|
$options = (array)self::get_array(self::$request->sel_options,$name);
|
||||||
|
if(is_numeric(end($name_parts)) && $options['label'] && $options['value'])
|
||||||
|
{
|
||||||
|
// Too deep, we got a single option
|
||||||
|
$options = array();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for base of name in root of sel_options
|
// Check for base of name in root of sel_options
|
||||||
if(!$options)
|
if(!$options)
|
||||||
{
|
{
|
||||||
$name_parts = explode('[',str_replace(array('[',']',']'),array('['),$name));
|
|
||||||
if (count($name_parts))
|
if (count($name_parts))
|
||||||
{
|
{
|
||||||
$org_name = $name_parts[count($name_parts)-1];
|
$org_name = $name_parts[count($name_parts)-1];
|
||||||
|
Loading…
Reference in New Issue
Block a user