diff --git a/.gitignore b/.gitignore index 57872d0..0dca145 100755 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /vendor/ +.idea diff --git a/addOrder.php b/addOrder.php index ea52e16..2fdfb45 100755 --- a/addOrder.php +++ b/addOrder.php @@ -16,7 +16,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; // Load object modCodeTiers -$module=(! empty($conf->global->SOCIETE_CODECLIENT_ADDON)?$conf->global->SOCIETE_CODECLIENT_ADDON:'mod_codeclient_leopard'); +$module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON', 'mod_codeclient_leopard'); if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module)-4); @@ -27,9 +27,9 @@ $res=dol_include_once($dirroot.$module.'.php'); if ($res) break; } -$modCodeClient = new $module; +$modCodeClient = new $module($db); // Load object modCodeFournisseur -$module=(! empty($conf->global->SOCIETE_CODECLIENT_ADDON)?$conf->global->SOCIETE_CODECLIENT_ADDON:'mod_codeclient_leopard'); +$module = getDolGlobalString('SOCIETE_CODECLIENT_ADDON', 'mod_codeclient_leopard'); if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module)-4); @@ -40,7 +40,7 @@ $res=dol_include_once($dirroot.$module.'.php'); if ($res) break; } -$modCodeFournisseur = new $module; +$modCodeFournisseur = new $module($db); // Load translation files required by the page $langs->load("mymodule@flightlog");