From ea4a83838cc91971cc43639e13cc22727161b2a9 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Wed, 15 Feb 2017 18:30:27 +0100
Subject: [PATCH] Missing not visible paramater

---
 htdocs/admin/system/dolibarr.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php
index 3117256e3d6..d7bd421770c 100644
--- a/htdocs/admin/system/dolibarr.php
+++ b/htdocs/admin/system/dolibarr.php
@@ -265,6 +265,7 @@ $configfileparameters=array(
 		'?dolibarr_main_db_prefix' => $langs->trans("Prefix"),
 		'separator2' => '',
 		'dolibarr_main_authentication' => $langs->trans("AuthenticationMode"),
+        '?multicompany_transverse_mode'=>  $langs->trans("MultiCompanyMode"),
 		'separator'=> '',
 		'?dolibarr_main_auth_ldap_login_attribute' => 'dolibarr_main_auth_ldap_login_attribute',
 		'?dolibarr_main_auth_ldap_host' => 'dolibarr_main_auth_ldap_host',
@@ -318,7 +319,11 @@ foreach($configfileparameters as $key => $value)
 	{
 		$newkey = preg_replace('/^\?/','',$key);
 
-		if (preg_match('/^\?/',$key) && empty(${$newkey})) continue;    // We discard parametes starting with ?
+		if (preg_match('/^\?/',$key) && empty(${$newkey})) 
+		{
+		    if ($newkey != 'multicompany_transverse_mode' || empty($conf->multicompany->enabled))
+                continue;    // We discard parameters starting with ?
+		}
 		if (strpos($newkey, 'separator') !== false && $lastkeyshown == 'separator') continue;
 
 		$var=!$var;
-- 
GitLab