From 3c0da7e2d767b8185b0a090c7de598d9f889bbd4 Mon Sep 17 00:00:00 2001 From: phf Date: Tue, 26 May 2015 10:54:31 +0200 Subject: [PATCH 1/2] FIX : extrafields required on thirdparty --- htdocs/societe/soc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 065bbbc0ac8..b0c54f00c8f 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -195,7 +195,11 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost($extralabels,$object); - if ($ret < 0) $error++; + if ($ret < 0) + { + $error++; // This increment output "1" as text error + $action = ($action=='add'?'create':'edit'); + } if (GETPOST('deletephoto')) $object->logo = ''; else if (! empty($_FILES['photo']['name'])) $object->logo = dol_sanitizeFileName($_FILES['photo']['name']); From 74c4db0f57364a9cd8c73fc1d6b6326229c4c6d3 Mon Sep 17 00:00:00 2001 From: atm-ph Date: Tue, 26 May 2015 11:23:25 +0200 Subject: [PATCH 2/2] Remove comment This comment is false, my $_SESSION was wrong --- htdocs/societe/soc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index b0c54f00c8f..2a9e159558c 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -197,7 +197,7 @@ if (empty($reshook)) $ret = $extrafields->setOptionalsFromPost($extralabels,$object); if ($ret < 0) { - $error++; // This increment output "1" as text error + $error++; $action = ($action=='add'?'create':'edit'); }