LSsearch : Added translation support for predefinedFilters labels

This commit is contained in:
Benjamin Renard 2010-02-19 14:48:26 +01:00
parent 0dd705b18a
commit f7d45c390f

View file

@ -978,7 +978,13 @@ class LSsearch {
return $this -> _canCopy; return $this -> _canCopy;
} }
elseif ($key=='predefinedFilters') { elseif ($key=='predefinedFilters') {
return ((is_array($this -> config['predefinedFilters']))?$this -> config['predefinedFilters']:array()); $retval=array();
if (is_array($this -> config['predefinedFilters'])) {
foreach($this -> config['predefinedFilters'] as $filter => $label) {
$retval[$filter]=__($label);
}
}
return $retval;
} }
else { else {
throw new Exception('Incorrect property !'); throw new Exception('Incorrect property !');