Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss
This commit is contained in:
commit
eeef5d25d7
1 changed files with 15 additions and 18 deletions
|
|
@ -810,27 +810,24 @@ function check()
|
|||
* we translate the code from the database into a hardcoded label
|
||||
*/
|
||||
$idx=$p_row[$v];
|
||||
if ( ! isset($this->a_select[$v][$idx])) {
|
||||
/*
|
||||
* Check if index exists
|
||||
*/
|
||||
$array_to_search=$this->a_select[$v];
|
||||
$value=$p_row[$v];
|
||||
$nb_search=count($array_to_search);
|
||||
$found=FALSE;
|
||||
for ( $e=0;$e< $nb_search;$e++) {
|
||||
if (isset ($array_to_search[$e]['value']) && $array_to_search[$e]['value']==$value ) {
|
||||
$found=TRUE;
|
||||
echo td($array_to_search[$e]['label']);
|
||||
}
|
||||
/*
|
||||
* Check if index exists
|
||||
*/
|
||||
$array_to_search=$this->a_select[$v];
|
||||
$value=$p_row[$v];
|
||||
|
||||
$nb_search=(is_array($array_to_search))?count($array_to_search):0;
|
||||
$found=FALSE;
|
||||
for ( $e=0;$e< $nb_search;$e++) {
|
||||
if (isset ($array_to_search[$e]['value']) && $array_to_search[$e]['value']==$value ) {
|
||||
$found=TRUE;
|
||||
echo td($array_to_search[$e]['label']);
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $found) {
|
||||
echo td("--");
|
||||
if ( ! $found) {
|
||||
echo td("--");
|
||||
|
||||
}
|
||||
} else {
|
||||
echo td($this->a_select[$v][$idx]["label"]);
|
||||
}
|
||||
|
||||
}else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue