From 943fa057e31ea50e4d8066c5477a83bc8ef6e338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20de=20Grandpr=C3=A9?= Date: Fri, 25 Apr 2025 19:22:37 -0400 Subject: [PATCH] FIX#33963 - Enabling EmailCollector foreign key field to allow mandatory parameter saving (#33981) * PHPStan > Update baseline * FIX#33963 - Enabling foreign key field to allow mandatory parameter saving * Added author to copyright --------- Co-authored-by: Dolibot --- htdocs/emailcollector/class/emailcollectoraction.class.php | 3 ++- htdocs/emailcollector/class/emailcollectorfilter.class.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index 342599b1b8b..f98f4bc2f40 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -3,6 +3,7 @@ * Copyright (C) ---Put here your own copyright and developer email--- * Copyright (C) 2024 Frédéric France * Copyright (C) 2024 MDW + * Copyright (C) 2025 Vincent de Grandpré * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -73,7 +74,7 @@ class EmailCollectorAction extends CommonObject */ public $fields = array( 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => "Id",), - 'fk_emailcollector' => array('type' => 'integer', 'label' => 'Id of emailcollector', 'enabled' => 0, 'visible' => 0, 'foreignkey' => 'emailcollector.rowid', 'position' => 0,), + 'fk_emailcollector' => array('type' => 'integer', 'label' => 'Id of emailcollector', 'enabled' => 1, 'visible' => 0, 'foreignkey' => 'emailcollector.rowid', 'position' => 0,), 'type' => array('type' => 'varchar(128)', 'label' => 'Type', 'enabled' => 1, 'visible' => 1, 'position' => 10, 'notnull' => 1, 'index' => 1), 'actionparam' => array('type' => 'text', 'label' => 'ParamForAction', 'enabled' => 1, 'visible' => 1, 'position' => 40, 'notnull' => -1), 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -2, 'position' => 500, 'notnull' => 1,), diff --git a/htdocs/emailcollector/class/emailcollectorfilter.class.php b/htdocs/emailcollector/class/emailcollectorfilter.class.php index 1333cd9c202..1783e490d7e 100644 --- a/htdocs/emailcollector/class/emailcollectorfilter.class.php +++ b/htdocs/emailcollector/class/emailcollectorfilter.class.php @@ -3,6 +3,7 @@ * Copyright (C) ---Put here your own copyright and developer email--- * Copyright (C) 2024 Frédéric France * Copyright (C) 2024 MDW + * Copyright (C) 2025 Vincent de Grandpré * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -75,7 +76,7 @@ class EmailCollectorFilter extends CommonObject */ public $fields = array( 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => "Id",), - 'fk_emailcollector' => array('type' => 'integer', 'label' => 'Id of emailcollector', 'enabled' => 0, 'visible' => 0, 'foreignkey' => 'emailcollector.rowid', 'position' => 0), + 'fk_emailcollector' => array('type' => 'integer', 'label' => 'Id of emailcollector', 'enabled' => 1, 'visible' => 0, 'foreignkey' => 'emailcollector.rowid', 'position' => 0), 'type' => array('type' => 'varchar(128)', 'label' => 'Type', 'enabled' => 1, 'visible' => 1, 'position' => 10, 'notnull' => 1,), 'rulevalue' => array('type' => 'varchar(255)', 'label' => 'ValueOfRule', 'enabled' => 1, 'visible' => 1, 'position' => 30, 'notnull' => -1, 'help' => "Value of Rule",), 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -2, 'position' => 500, 'notnull' => 1,),