Bug in card creation bug 27Feb 2006

This commit is contained in:
sparkyx 2007-02-27 12:02:34 +00:00
parent a0221f54d5
commit 7ac2c86b47
5 changed files with 20 additions and 10 deletions

View file

@ -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();
}

View file

@ -0,0 +1,7 @@
begin;
delete from attr_min where ad_id=5;
update version set val=25;
commit;

View file

@ -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 ) {

View file

@ -28,7 +28,7 @@ define ("phpcompta_psql_port","5432");
define ("domaine","");
define ("DEBUG","false");
define ("DEBUG","true");
// securite correspond a la table
// action

View file

@ -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