diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:17:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:17:47 +0000 |
commit | 5419d4428c86c488a43124f85e5407d7cbae6541 (patch) | |
tree | 772c4221a20fd7d1b3e7e67c6e21755a50e80fd7 /application/views/helpers/FormDataFilter.php | |
parent | Adding upstream version 1.10.2. (diff) | |
download | icingaweb2-module-director-upstream.tar.xz icingaweb2-module-director-upstream.zip |
Adding upstream version 1.11.1.upstream/1.11.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | application/views/helpers/FormDataFilter.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/application/views/helpers/FormDataFilter.php b/application/views/helpers/FormDataFilter.php index d8bc508..a62b906 100644 --- a/application/views/helpers/FormDataFilter.php +++ b/application/views/helpers/FormDataFilter.php @@ -44,14 +44,16 @@ class Zend_View_Helper_FormDataFilter extends Zend_View_Helper_FormElement { $info = $this->_getInfo($name, $value, $attribs); extract($info); // id, name, value, attribs, options, listsep, disable - if (array_key_exists('columns', $attribs)) { - $this->setColumns($attribs['columns']); - unset($attribs['columns']); - } + if ($attribs) { + if (array_key_exists('columns', $attribs)) { + $this->setColumns($attribs['columns']); + unset($attribs['columns']); + } - if (array_key_exists('suggestionContext', $attribs)) { - $this->setSuggestionContext($attribs['suggestionContext']); - unset($attribs['suggestionContext']); + if (array_key_exists('suggestionContext', $attribs)) { + $this->setSuggestionContext($attribs['suggestionContext']); + unset($attribs['suggestionContext']); + } } // TODO: check for columns in attribs, preserve & remove them from the @@ -217,7 +219,7 @@ class Zend_View_Helper_FormDataFilter extends Zend_View_Helper_FormElement } elseif (substr($col, $prefixLen, 5) === 'vars.') { $var = substr($col, $prefixLen + 5); - return $this->text($filter, "DataListValues!${var}"); + return $this->text($filter, "DataListValues!{$var}"); } } @@ -236,7 +238,7 @@ class Zend_View_Helper_FormDataFilter extends Zend_View_Helper_FormElement $filter->getExpression(), [ 'class' => 'director-suggest', - 'data-suggestion-context' => "${type}groupnames", + 'data-suggestion-context' => "{$type}groupnames", ] ); } |