for nextmatch filters we need to encode global nextmatch definition too

This commit is contained in:
Ralf Becker 2015-01-12 14:10:40 +00:00
parent f15a37f368
commit 86eba3f137
2 changed files with 9 additions and 1 deletions

View File

@ -203,6 +203,14 @@ class etemplate_widget_customfields extends etemplate_widget_transformer
$fields_with_vals[]=$lname;
}
}
// need to encode values/select-options to keep their order
foreach($customfields as &$data)
{
if (!empty($data['values']))
{
etemplate_widget_menupopup::fix_encoded_options($data['values']);
}
}
if($fields != $customfields)
{
// This widget has different settings from global

View File

@ -276,7 +276,7 @@ class etemplate_widget_menupopup extends etemplate_widget
// so check here, as we re-index
// Duplicates might happen if app programmer isn't paying attention and
// either uses the same ID in the template, or adds the options twice
if(is_numeric($value) && (!is_array($label) || is_array($label) && !array_key_exists('value',$label)))
if(!is_array($label) || is_array($label) && !array_key_exists('value',$label))
{
$check_value = (string)(is_array($label) && array_key_exists('value', $label) ? $label['value'] : $value);
if((string)$value === $check_value)