mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 23:19:04 +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]
|
||||
$name_parts = explode('[',str_replace(array('[',']',']'),array('['),$name));
|
||||
if(!$options)
|
||||
{
|
||||
$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
|
||||
if(!$options)
|
||||
{
|
||||
$name_parts = explode('[',str_replace(array('[',']',']'),array('['),$name));
|
||||
if (count($name_parts))
|
||||
{
|
||||
$org_name = $name_parts[count($name_parts)-1];
|
||||
|
Loading…
Reference in New Issue
Block a user