diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 972458dd5c8..35a23a447f4 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -1335,8 +1335,8 @@ class FormTicket //var_dump($keytoavoidconflict); if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelselected') && GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1')) { if (!empty($arraydefaultmessage->joinfiles) && !empty($this->param['fileinit']) && is_array($this->param['fileinit'])) { - foreach ($this->param['fileinit'] as $file) { - $formmail->add_attached_files($file, basename($file), dol_mimetype($file)); + foreach ($this->param['fileinit'] as $path) { + $formmail->add_attached_files($path, basename($path), dol_mimetype($path)); } } } diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index b96e0fdd2dc..e97357357c3 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -819,7 +819,7 @@ class RssParser * @param string $ent * @param string|false $base * @param string $sysID - * @param string[false $pubID + * @param string|false $pubID * @return bool function extEntHandler($parser, $ent, $base, $sysID, $pubID) { print 'extEntHandler ran'; diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index 5a2dcbc0c77..13c2aae7aef 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -322,7 +322,6 @@ if (!empty($force_install_noedit)) { } // Version min of database - $versionbasemin = explode('.', $class::VERSIONMIN); $note = '('.$class::LABEL.' >= '.$class::VERSIONMIN.')'; // Switch to mysql if mysqli is not present diff --git a/htdocs/public/eventorganization/attendee_new.php b/htdocs/public/eventorganization/attendee_new.php index 4d246fa76a8..8973e1c6be2 100644 --- a/htdocs/public/eventorganization/attendee_new.php +++ b/htdocs/public/eventorganization/attendee_new.php @@ -470,7 +470,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen $thirdparty->email = ($emailcompany ? $emailcompany : $email); // Load object modCodeTiers - $module = (getDolGlobalString('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); } diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index f4b8adb8d00..d6d59113ab5 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -260,7 +260,7 @@ if (empty($reshook) && $action == 'add') { $thirdparty->email = ($emailcompany ? $emailcompany : $email); // Load object modCodeTiers - $module = (getDolGlobalString('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); } @@ -330,7 +330,7 @@ if (empty($reshook) && $action == 'add') { $thirdparty->fournisseur = 1; // Load object modCodeFournisseur - $module = (getDolGlobalString('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); } @@ -341,7 +341,7 @@ if (empty($reshook) && $action == 'add') { break; } } - $modCodeFournisseur = new $module(); + $modCodeFournisseur = new $module($db); if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) { $tmpcode = $modCodeFournisseur->getNextValue($thirdparty, 1); } diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 39fcb7cc801..328ddffbc51 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -261,7 +261,7 @@ if (empty($reshook) && $action == 'add') { $thirdparty->email = ($emailcompany ? $emailcompany : $email); // Load object modCodeTiers - $module = (getDolGlobalString('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); } @@ -330,7 +330,7 @@ if (empty($reshook) && $action == 'add') { $thirdparty->fournisseur = 1; // Load object modCodeFournisseur - $module = (getDolGlobalString('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); } @@ -341,7 +341,7 @@ if (empty($reshook) && $action == 'add') { break; } } - $modCodeFournisseur = new $module(); + $modCodeFournisseur = new $module($db); if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) { $tmpcode = $modCodeFournisseur->getNextValue($thirdparty, 1); } diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 1a405cf7799..0ca0079270a 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -153,7 +153,7 @@ abstract class ActionsCardCommon } // Load object modCodeClient - $module = (getDolGlobalString('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); } diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 9f191c19c9f..dc9bfbf3c3e 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -905,7 +905,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio } // Load object modCodeTiers - $module = (getDolGlobalString('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); } @@ -918,7 +918,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio } $modCodeClient = new $module($db); // Load object modCodeFournisseur - $module = (getDolGlobalString('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); } @@ -1800,7 +1800,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio $head = societe_prepare_head($object); // Load object modCodeTiers - $module = (getDolGlobalString('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); }