diff --git a/html/admin/setup.php b/html/admin/setup.php index b5d41b17c..a2a21c957 100644 --- a/html/admin/setup.php +++ b/html/admin/setup.php @@ -493,6 +493,9 @@ if ( DEBUG=='false' ) ob_start(); if ( GetVersion($db) == 23 ) { ExecuteScript($db,'sql/patch/upgrade23.sql'); } // version + if ( GetVersion($db) == 24 ) { + ExecuteScript($db,'sql/patch/upgrade24.sql'); + } // version if ( DEBUG == 'false') ob_end_clean(); }//for @@ -599,6 +602,9 @@ if (DEBUG == 'false' ) ob_start(); if ( GetVersion($db) == 23 ) { ExecuteScript($db,'sql/patch/upgrade23.sql'); } // version + if ( GetVersion($db) == 24 ) { + ExecuteScript($db,'sql/patch/upgrade24.sql'); + } // version if ( DEBUG == 'false') ob_end_clean(); } diff --git a/html/admin/sql/patch/upgrade24.sql b/html/admin/sql/patch/upgrade24.sql new file mode 100644 index 000000000..7c362807f --- /dev/null +++ b/html/admin/sql/patch/upgrade24.sql @@ -0,0 +1,7 @@ +begin; + +delete from attr_min where ad_id=5; + +update version set val=25; + +commit; \ No newline at end of file diff --git a/include/class_fiche_def.php b/include/class_fiche_def.php index d3dcad849..6748b0dc9 100644 --- a/include/class_fiche_def.php +++ b/include/class_fiche_def.php @@ -156,12 +156,12 @@ class fiche_def { // foreach ( $array as $key=>$element ) { - echo_debug('class_fiche',__LINE__,"p_$key $element"); + echo_debug('class_fiche_def',__LINE__,"p_$key $element"); ${"p_$key"}=$element; } // Format correctly the name of the cat. of card $p_nom_mod=FormatString($p_nom_mod); - echo_debug('class_fiche',__LINE__,"Adding $p_nom_mod"); + echo_debug('class_fiche_def',__LINE__,"Adding $p_nom_mod"); // Format the p_class_base // must be an integer if ( isNumber($p_class_base) == 0 && FormatString($p_class_base) != null ) { diff --git a/include/constant.php b/include/constant.php index 5f8415e15..f4b03a24d 100644 --- a/include/constant.php +++ b/include/constant.php @@ -28,7 +28,7 @@ define ("phpcompta_psql_port","5432"); define ("domaine",""); -define ("DEBUG","false"); +define ("DEBUG","true"); // securite correspond a la table // action diff --git a/include/fiche_inc.php b/include/fiche_inc.php index 5a3891faf..232b6f901 100644 --- a/include/fiche_inc.php +++ b/include/fiche_inc.php @@ -153,13 +153,10 @@ function Get_fiche_def_ref($p_cn) *************************************************** * \brief retrieve the mandatory field of the card model * - * parm : - * - $p_cn database connexion - * - $p_fiche_def_ref - * gen : - * - - * return: - * array of ad_id (attr_min.ad_id) and labels (attr_def.ad_text) + * \param $p_cn database connexion + * \param $p_fiche_def_ref + * \return array of ad_id (attr_min.ad_id) and labels (attr_def.ad_text) + * */ function Get_attr_min($p_cn,$p_fiche_def_ref) { // find the min attr for the fiche_def_ref