noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 43/44: gitlab #3 Manage Table issue with the


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 43/44: gitlab #3 Manage Table issue with the type SELECT, cannot reproduce bug Back to old version to fix issue with the type "SELECT" from the menu Syndicat.tools->section
Date: Wed, 26 Dec 2018 04:29:57 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 3f53de417dd89e9a90a386404f93f8648155e046
Author: Dany De Bontridder <address@hidden>
Date:   Tue Dec 25 23:19:36 2018 +0100

    gitlab #3 Manage Table issue with the type SELECT, cannot reproduce bug
    Back to old version to fix issue with the type "SELECT" from
    the menu Syndicat.tools->section
---
 include/lib/manage_table_sql.class.php | 33 +++++++++++++++------------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/include/lib/manage_table_sql.class.php 
b/include/lib/manage_table_sql.class.php
index 87427d3..51aef22 100644
--- a/include/lib/manage_table_sql.class.php
+++ b/include/lib/manage_table_sql.class.php
@@ -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 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]