Skip to content
Snippets Groups Projects
Commit 20262a01 authored by Marcos García de La Fuente's avatar Marcos García de La Fuente
Browse files

Fix bug #1295: Error when creating an agenda extrafield with a number as reference

parent ccc40362
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,7 @@ Fix: [ bug #520 ] Product statistics and detailed lists are wrong.
Fix: [ bug #1240 ] traduction.
Fix: [ bug #1238 ] When creating accompte with a %, free product are used for calculation.
Fix: [ bug #1280 ] service with not end of date was tagged as expired.
Fix: [ bug #1295 ] Error when creating an agenda extrafield with a number as reference
***** ChangeLog for 3.5 compared to 3.4.* *****
For users:
......
......@@ -985,7 +985,7 @@ class DoliDBMysql extends DoliDB
{
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
// ex. : $field_desc = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment');
$sql= "ALTER TABLE ".$table." ADD ".$field_name." ";
$sql= "ALTER TABLE ".$table." ADD `".$field_name."` ";
$sql.= $field_desc['type'];
if(preg_match("/^[^\s]/i",$field_desc['value']))
if (! in_array($field_desc['type'],array('date','datetime')))
......
......@@ -979,7 +979,7 @@ class DoliDBMysqli extends DoliDB
{
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
// ex. : $field_desc = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment');
$sql= "ALTER TABLE ".$table." ADD ".$field_name." ";
$sql= "ALTER TABLE ".$table." ADD `".$field_name."` ";
$sql.= $field_desc['type'];
if(preg_match("/^[^\s]/i",$field_desc['value']))
if (! in_array($field_desc['type'],array('date','datetime')))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment