Private GIT

Skip to content
Snippets Groups Projects
Commit ee150190 authored by Benoît Sauveton's avatar Benoît Sauveton
Browse files

#4054 optimisation

parent 18337d9b
Branches
Tags
No related merge requests found
......@@ -389,6 +389,7 @@ class HTML_QuickForm_select2 extends HTML_QuickForm_select
return $datas;
}
var $_memOptions = array();
/**
*
*/
......@@ -412,7 +413,8 @@ class HTML_QuickForm_select2 extends HTML_QuickForm_select
$currentOption .= '>'
. $dataSet['text'] . "</option>";
if (strpos($this->_defaultSelectedOptions, $currentOption) === false) {
if (!in_array($dataSet['id'], $this->_memOptions)) {
$this->_memOptions[] = $dataSet['id'];
$this->_defaultSelectedOptions .= $currentOption;
}
}
......@@ -422,7 +424,8 @@ class HTML_QuickForm_select2 extends HTML_QuickForm_select
. $elementValue . '">'
. $elementName . "</option>";
if (strpos($this->_defaultSelectedOptions, $currentOption) === false) {
if (!in_array($elementValue, $this->_memOptions)) {
$this->_memOptions[] = $elementValue;
$this->_defaultSelectedOptions .= $currentOption;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment