From fe525397872f0163022e951c87c6c4839fe7b401 Mon Sep 17 00:00:00 2001 From: bahfir abbes Date: Fri, 24 Apr 2020 17:26:52 +0100 Subject: [PATCH 1/3] =?UTF-8?q?fix:rempalcement=20de=20qqes=20valeurs=20de?= =?UTF-8?q?=20champs=20de=20BDDs=20par=20les=20valeurs=20ad=C3=A9quates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/modulebuilder/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 2209dbf92d4..0872345b5be 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -700,7 +700,9 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', $fieldname = $obj->Field; // type $type = $obj->Type; - if ($type == 'int(11)') $type = 'integer'; + if ($type == 'int(11)') $type='integer'; + if ($type == 'float') $type='real'; + if (strchr($type,'tinyint')) $type='boolean'; if ($obj->Field == 'fk_soc') $type = 'integer:Societe:societe/class/societe.class.php'; if (preg_match('/^fk_proj/', $obj->Field)) $type = 'integer:Project:projet/class/project.class.php:1:fk_statut=1'; if (preg_match('/^fk_prod/', $obj->Field)) $type = 'integer:Product:product/class/product.class.php:1'; From a5ed630a57427e24046467937d9add00990b4743 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 31 May 2020 00:19:21 +0000 Subject: [PATCH 2/3] Fixing style errors. --- htdocs/modulebuilder/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 0872345b5be..2e1a8666a1c 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -702,7 +702,7 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', $type = $obj->Type; if ($type == 'int(11)') $type='integer'; if ($type == 'float') $type='real'; - if (strchr($type,'tinyint')) $type='boolean'; + if (strchr($type, 'tinyint')) $type='boolean'; if ($obj->Field == 'fk_soc') $type = 'integer:Societe:societe/class/societe.class.php'; if (preg_match('/^fk_proj/', $obj->Field)) $type = 'integer:Project:projet/class/project.class.php:1:fk_statut=1'; if (preg_match('/^fk_prod/', $obj->Field)) $type = 'integer:Product:product/class/product.class.php:1'; From 52d0c1a9ae7531b8e4cdbfe2997c953674d97434 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 1 Jun 2020 20:54:24 +0200 Subject: [PATCH 3/3] Update index.php --- htdocs/modulebuilder/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 2e1a8666a1c..cebad040a8a 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -702,7 +702,7 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', $type = $obj->Type; if ($type == 'int(11)') $type='integer'; if ($type == 'float') $type='real'; - if (strchr($type, 'tinyint')) $type='boolean'; + if (strstr($type, 'tinyint')) $type='integer'; if ($obj->Field == 'fk_soc') $type = 'integer:Societe:societe/class/societe.class.php'; if (preg_match('/^fk_proj/', $obj->Field)) $type = 'integer:Project:projet/class/project.class.php:1:fk_statut=1'; if (preg_match('/^fk_prod/', $obj->Field)) $type = 'integer:Product:product/class/product.class.php:1';