clean code

This commit is contained in:
Laurent Destailleur 2022-06-27 11:52:33 +02:00
parent 7e94eaac07
commit 9372b69eb4

View File

@ -10476,14 +10476,14 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
$TCompiledAttr[] = $key.'="'.$value.'"'; $TCompiledAttr[] = $key.'="'.$value.'"';
} }
$compiledAttributes = !empty($TCompiledAttr) ?implode(' ', $TCompiledAttr) : ''; $compiledAttributes = empty($TCompiledAttr) ? '' : implode(' ', $TCompiledAttr);
$tag = !empty($attr['href']) ? 'a' : 'span'; $tag = !empty($attr['href']) ? 'a' : 'span';
$parameters = array( $parameters = array(
'TCompiledAttr' => $TCompiledAttr, 'TCompiledAttr' => $TCompiledAttr, // array
'compiledAttributes' => $compiledAttributes, 'compiledAttributes' => $compiledAttributes, // string
'attr' => $attr, 'attr' => $attr,
'tag' => $tag, 'tag' => $tag,
'label' => $label, 'label' => $label,