diff --git a/htdocs/admin/societe.php b/htdocs/admin/societe.php
index f6852f1c7f7..302c5a12012 100644
--- a/htdocs/admin/societe.php
+++ b/htdocs/admin/societe.php
@@ -34,7 +34,6 @@ $langs->load("admin");
if (!$user->admin)
accessforbidden();
-
/*
* Actions
*/
@@ -80,9 +79,15 @@ if ($_POST["action"] == 'usesearchtoselectcompany')
// define constants for models generator that need parameters
if ($_POST["action"] == 'setModuleOptions')
{
- $param=$_POST["param1"];
- $value=$_POST["value1"];
- if ($param) dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
+ for($i=0;$i < count($_POST);$i++)
+ {
+ if (array_key_exists('param'.$i,$_POST))
+ {
+ $param=$_POST["param".$i];
+ $value=$_POST["value".$i];
+ if ($param) dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
+ }
+ }
}
// Activate a document generator module
diff --git a/htdocs/includes/modules/societe/mod_codeclient_elephant.php b/htdocs/includes/modules/societe/mod_codeclient_elephant.php
index e992e38896d..ae678cab126 100644
--- a/htdocs/includes/modules/societe/mod_codeclient_elephant.php
+++ b/htdocs/includes/modules/societe/mod_codeclient_elephant.php
@@ -77,9 +77,9 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
$texte = $langs->trans('GenericNumRefModelDesc')."
\n";
$texte.= '