diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 00db45c36b8..455c6181552 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -822,7 +822,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Actions to send emails - $trigger_name = 'MEMBER_SENTBYMAIL'; + $triggersendname = 'MEMBER_SENTBYMAIL'; $paramname = 'id'; $mode = 'emailfrommember'; $trackid = 'mem'.$object->id; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index fb76c3c0676..eea2aaad9b4 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -95,7 +95,7 @@ if ($action == 'update' && empty($_POST["cancel"])) // Actions to send emails $id = 0; $actiontypecode = ''; // Not an event for agenda -$trigger_name = ''; // Disable triggers +$triggersendname = ''; // Disable triggers $paramname = 'id'; $mode = 'emailfortest'; $trackid = (($action == 'testhtml') ? "testhtml" : "test"); diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 811ffa3bece..3221c67fbc8 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -77,7 +77,7 @@ if ($action == 'update' && empty($_POST["cancel"])) // Actions to send emails $id=0; $actiontypecode=''; // Not an event for agenda -$trigger_name=''; // Disable triggers +$triggersendname = ''; // Disable triggers $paramname='id'; $mode='emailfortest'; $trackid=(($action == 'testhtml')?"testhtml":"test"); diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index b23bf03f29b..d6b92639233 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -97,7 +97,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - $trigger_name = 'ASSET_SENTBYMAIL'; + $triggersendname = 'ASSET_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_ASSET_TO'; $trackid = 'asset'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 150d3a69717..e5647fc5b5a 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -119,7 +119,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Actions to send emails - $trigger_name = 'BOM_SENTBYMAIL'; + $triggersendname = 'BOM_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_BOM_TO'; $trackid = 'bom'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index e916c544ced..e6b1b47d0b6 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -781,7 +781,7 @@ if (empty($reshook)) // Actions to send emails $actiontypecode = 'AC_OTH_AUTO'; - $trigger_name = 'PROPAL_SENTBYMAIL'; + $triggersendname = 'PROPAL_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_PROPOSAL_TO'; $trackid = 'pro'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index ac5b35eef44..f654ed932b7 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2501,11 +2501,11 @@ class Propal extends CommonObject if ($resql) { $modelpdf = $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED ? $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED : $this->modelpdf; - $trigger_name = 'PROPAL_CLOSE_REFUSED'; + $triggerName = 'PROPAL_CLOSE_REFUSED'; if ($statut == self::STATUS_SIGNED) { - $trigger_name = 'PROPAL_CLOSE_SIGNED'; + $triggerName = 'PROPAL_CLOSE_SIGNED'; $modelpdf = $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL ? $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL : $this->modelpdf; // The connected company is classified as a client @@ -2522,7 +2522,7 @@ class Propal extends CommonObject } if ($statut == self::STATUS_BILLED) // Why this ? { - $trigger_name = 'PROPAL_CLASSIFY_BILLED'; + $triggerName = 'PROPAL_CLASSIFY_BILLED'; } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) @@ -2550,7 +2550,7 @@ class Propal extends CommonObject if (!$notrigger && empty($error)) { // Call trigger - $result = $this->call_trigger($trigger_name, $user); + $result = $this->call_trigger($triggerName, $user); if ($result < 0) { $error++; } // End call triggers } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 803d699077f..8d43c54cc7c 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1415,7 +1415,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Actions to send emails - $trigger_name = 'ORDER_SENTBYMAIL'; + $triggersendname = 'ORDER_SENTBYMAIL'; $paramname = 'id'; $autocopy = 'MAIN_MAIL_AUTOCOPY_ORDER_TO'; // used to know the automatic BCC to add $trackid = 'ord'.$object->id; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 9e34c745fab..70a504f23f3 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -223,7 +223,7 @@ if (empty($reshook)) $permissiontoread = $user->rights->commande->lire; $permissiontodelete = $user->rights->commande->supprimer; $uploaddir = $conf->commande->multidir_output[$conf->entity]; - $trigger_name = 'ORDER_SENTBYMAIL'; + $triggersendname = 'ORDER_SENTBYMAIL'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index cdfa106e755..14a4f4bae9b 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2481,7 +2481,7 @@ if (empty($reshook)) // Actions to send emails if (empty($id)) $id = $facid; - $trigger_name = 'BILL_SENTBYMAIL'; + $triggersendname = 'BILL_SENTBYMAIL'; $paramname = 'id'; $autocopy = 'MAIN_MAIL_AUTOCOPY_INVOICE_TO'; $trackid = 'inv'.$object->id; diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index ea6ef4d0530..2998e0890f2 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -482,7 +482,7 @@ if (empty($reshook)) } // Actions to send emails - $trigger_name = 'CONTACT_SENTBYMAIL'; + $triggersendname = 'CONTACT_SENTBYMAIL'; $paramname = 'id'; $mode = 'emailfromcontact'; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index efd521e9ec0..accbbfa242e 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1002,7 +1002,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Actions to send emails - $trigger_name = 'CONTRACT_SENTBYMAIL'; + $triggersendname = 'CONTRACT_SENTBYMAIL'; $paramname = 'id'; $mode = 'emailfromcontract'; $trackid = 'con'.$object->id; diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 9c87e6ebe36..f490397754d 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -26,7 +26,7 @@ // $id must be defined // $paramname may be defined // $autocopy may be defined (used to know the automatic BCC to add) -// $trigger_name must be set (can be '') +// $triggersendname must be set (can be '') // $actiontypecode can be set // $object and $uobject may be defined @@ -453,12 +453,12 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $object->email_subject = $subject; $object->email_msgid = $mailfile->msgid; - // Call of triggers - if (! empty($trigger_name)) + // Call of triggers (you should have set $triggersendname to execute trigger. $trigger_name is deprcated) + if (! empty($triggersendname) || ! empty($trigger_name)) { include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($db); - $result=$interface->run_triggers($trigger_name, $object, $user, $langs, $conf); + $result=$interface->run_triggers(empty($triggersendname)?$trigger_name:$triggersendname, $object, $user, $langs, $conf); if ($result < 0) { setEventMessages($interface->error, $interface->errors, 'errors'); } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index afe47934e4a..a6084a49f7e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4956,11 +4956,11 @@ abstract class CommonObject * NB: Error from trigger are stacked in interface->errors * NB2: If return code of triggers are < 0, action calling trigger should cancel all transaction. * - * @param string $trigger_name trigger's name to execute + * @param string $triggerName trigger's name to execute * @param User $user Object user * @return int Result of run_triggers */ - public function call_trigger($trigger_name, $user) + public function call_trigger($triggerName, $user) { // phpcs:enable global $langs, $conf; @@ -4972,7 +4972,7 @@ abstract class CommonObject include_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php'; $interface = new Interfaces($this->db); - $result = $interface->run_triggers($trigger_name, $this, $user, $langs, $conf); + $result = $interface->run_triggers($triggerName, $this, $user, $langs, $conf); if ($result < 0) { diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 979ffe416b4..7471b3d30a4 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -795,18 +795,18 @@ class EcmDirectory // extends CommonObject * NB2: if trigger fail, action should be canceled. * NB3: Should be deleted if EcmDirectory extend CommonObject * - * @param string $trigger_name trigger's name to execute + * @param string $triggerName trigger's name to execute * @param User $user Object user * @return int Result of run_triggers */ - public function call_trigger($trigger_name, $user) + public function call_trigger($triggerName, $user) { // phpcs:enable global $langs,$conf; include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); - $result=$interface->run_triggers($trigger_name, $this, $user, $langs, $conf); + $result=$interface->run_triggers($triggerName, $this, $user, $langs, $conf); if ($result < 0) { if (!empty($this->errors)) { diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index ca543f5f2d5..40445b522da 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -849,7 +849,7 @@ if (empty($reshook)) // Actions to send emails if (empty($id)) $id = $facid; - $trigger_name = 'SHIPPING_SENTBYMAIL'; + $triggersendname = 'SHIPPING_SENTBYMAIL'; $paramname = 'id'; $mode = 'emailfromshipment'; $trackid = 'shi'.$object->id; diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index b24259d797a..b44c9b0e9d6 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1411,7 +1411,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - $trigger_name = 'EXPENSEREPORT_SENTBYMAIL'; + $triggersendname = 'EXPENSEREPORT_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_EXPENSEREPORT_TO'; $trackid = 'exp'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 9371c6a308a..2d4dc5f7143 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -721,7 +721,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - $trigger_name = 'FICHINTER_SENTBYMAIL'; + $triggersendname = 'FICHINTER_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_FICHINTER_TO'; $trackid = 'int'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index b1ebe4a3895..abda1519002 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2420,18 +2420,19 @@ class CommandeFournisseur extends CommonOrder if ($resql) { // Trigger names for each status - $trigger_name[0] = 'DRAFT'; - $trigger_name[1] = 'VALIDATED'; - $trigger_name[2] = 'APPROVED'; - $trigger_name[3] = 'ORDERED'; // Ordered - $trigger_name[4] = 'RECEIVED_PARTIALLY'; - $trigger_name[5] = 'RECEIVED_COMPLETELY'; - $trigger_name[6] = 'CANCELED'; - $trigger_name[7] = 'CANCELED'; - $trigger_name[9] = 'REFUSED'; + $triggerName = array(); + $triggerName[0] = 'DRAFT'; + $triggerName[1] = 'VALIDATED'; + $triggerName[2] = 'APPROVED'; + $triggerName[3] = 'ORDERED'; // Ordered + $triggerName[4] = 'RECEIVED_PARTIALLY'; + $triggerName[5] = 'RECEIVED_COMPLETELY'; + $triggerName[6] = 'CANCELED'; + $triggerName[7] = 'CANCELED'; + $triggerName[9] = 'REFUSED'; // Call trigger - $result = $this->call_trigger("ORDER_SUPPLIER_STATUS_".$trigger_name[$status], $user); + $result = $this->call_trigger("ORDER_SUPPLIER_STATUS_".$triggerName[$status], $user); if ($result < 0) { $error++; } // End call triggers } diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 7e330635de8..a8ec90f86fe 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1028,7 +1028,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - $trigger_name = 'ORDER_SUPPLIER_SENTBYMAIL'; + $triggersendname = 'ORDER_SUPPLIER_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO'; $trackid = 'sor'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index a4a7964ca5a..51cf62258a6 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1497,7 +1497,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - $trigger_name = 'BILL_SUPPLIER_SENTBYMAIL'; + $triggersendname = 'BILL_SUPPLIER_SENTBYMAIL'; $paramname = 'id'; $autocopy = 'MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO'; $trackid = 'sin'.$object->id; diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index c5a88028586..5c09090dde1 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -872,7 +872,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - $trigger_name='HOLIDAY_SENTBYMAIL'; + $triggersendname = 'HOLIDAY_SENTBYMAIL'; $autocopy='MAIN_MAIL_AUTOCOPY_HOLIDAY_TO'; $trackid='leav'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 564cd14d5ec..bd06d9594ee 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -160,7 +160,7 @@ if (empty($reshook)) } // Actions to send emails - $trigger_name = 'MYOBJECT_SENTBYMAIL'; + $triggersendname = 'MYOBJECT_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_MYOBJECT_TO'; $trackid = 'myobject'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 7fe93d795a1..baa4c09725f 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -146,7 +146,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - $trigger_name = 'MO_SENTBYMAIL'; + $triggersendname = 'MO_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_MO_TO'; $trackid = 'mo'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 45507e44928..28800d23bd2 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -133,7 +133,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - $trigger_name = 'MO_SENTBYMAIL'; + $triggersendname = 'MO_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_MO_TO'; $trackid = 'mo'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index 09949ee3791..bb6802469e3 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -112,7 +112,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - /*$trigger_name='MYOBJECT_SENTBYMAIL'; + /*$triggersendname = 'MYOBJECT_SENTBYMAIL'; $autocopy='MAIN_MAIL_AUTOCOPY_MYOBJECT_TO'; $trackid='myobject'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';*/ diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 093d1c2c3f9..e7f7799691d 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -119,7 +119,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - /*$trigger_name='MYOBJECT_SENTBYMAIL'; + /*$triggersendname = 'MYOBJECT_SENTBYMAIL'; $autocopy='MAIN_MAIL_AUTOCOPY_MYOBJECT_TO'; $trackid='myobject'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';*/ diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 493978f738e..455a5742a68 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -456,7 +456,7 @@ if (empty($reshook)) } // Actions to send emails - $trigger_name = 'PROJECT_SENTBYMAIL'; + $triggersendname = 'PROJECT_SENTBYMAIL'; $paramname = 'id'; $autocopy = 'MAIN_MAIL_AUTOCOPY_PROJECT_TO'; // used to know the automatic BCC to add $trackid = 'proj'.$object->id; diff --git a/htdocs/public/ticket/view.php b/htdocs/public/ticket/view.php index 43e03ef4c07..fd57df992ca 100644 --- a/htdocs/public/ticket/view.php +++ b/htdocs/public/ticket/view.php @@ -198,7 +198,7 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a //$object->doActions($action); // Actions to send emails (for ticket, we need to manage the addfile and removefile only) -$trigger_name = 'TICKET_SENTBYMAIL'; +$triggersendname = 'TICKET_SENTBYMAIL'; $paramname = 'id'; $autocopy = 'MAIN_MAIL_AUTOCOPY_TICKET_TO'; // used to know the automatic BCC to add $trackid = 'tic'.$object->id; diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 4989e0484a2..e8a67222a30 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -688,7 +688,7 @@ if (empty($reshook)) // Actions to send emails if (empty($id)) $id = $facid; - $trigger_name = 'RECEPTION_SENTBYMAIL'; + $triggersendname = 'RECEPTION_SENTBYMAIL'; $paramname = 'id'; $mode = 'emailfromreception'; $trackid = 'shi'.$object->id; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 464f94d71cb..83da4d9aed9 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -862,7 +862,7 @@ if (empty($reshook)) $object->fetch($socid); // Actions to send emails - $trigger_name = 'COMPANY_SENTBYMAIL'; + $triggersendname = 'COMPANY_SENTBYMAIL'; $paramname = 'socid'; $mode = 'emailfromthirdparty'; $trackid = 'thi'.$object->id; diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 584fcd0f4a5..609dc8d3b0c 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -491,7 +491,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - $trigger_name = 'PROPOSAL_SUPPLIER_SENTBYMAIL'; + $triggersendname = 'PROPOSAL_SUPPLIER_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO'; $trackid = 'spr'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index b6ff684fa7c..b0369dc1661 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1729,11 +1729,11 @@ class SupplierProposal extends CommonObject if ($resql) { $modelpdf=$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED?$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED:$this->modelpdf; - $trigger_name='SUPPLIER_PROPOSAL_CLOSE_REFUSED'; + $triggerName = 'SUPPLIER_PROPOSAL_CLOSE_REFUSED'; if ($status == 2) { - $trigger_name='SUPPLIER_PROPOSAL_CLOSE_SIGNED'; + $triggerName='SUPPLIER_PROPOSAL_CLOSE_SIGNED'; $modelpdf=$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL?$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL:$this->modelpdf; if (! empty($conf->global->SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL)) // TODO This option was not tested correctly. Error if product ref does not exists @@ -1743,7 +1743,7 @@ class SupplierProposal extends CommonObject } if ($status == 4) { - $trigger_name='SUPPLIER_PROPOSAL_CLASSIFY_BILLED'; + $triggerName='SUPPLIER_PROPOSAL_CLASSIFY_BILLED'; } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) @@ -1760,7 +1760,7 @@ class SupplierProposal extends CommonObject } // Call trigger - $result=$this->call_trigger($trigger_name, $user); + $result=$this->call_trigger($triggerName, $user); if ($result < 0) { $error++; } // End call triggers diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index edbd1257c68..cc7f5a60dbb 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -593,7 +593,7 @@ $permissiontoadd = $user->rights->ticket->write; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Actions to send emails -$trigger_name = 'TICKET_SENTBYMAIL'; +$triggersendname = 'TICKET_SENTBYMAIL'; $paramname = 'id'; $autocopy = 'MAIN_MAIL_AUTOCOPY_TICKET_TO'; // used to know the automatic BCC to add $trackid = 'tic'.$object->id; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index c6f9123d9c1..e72c2833933 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -657,7 +657,7 @@ if (empty($reshook)) { } // Actions to send emails - $trigger_name = 'USER_SENTBYMAIL'; + $triggersendname = 'USER_SENTBYMAIL'; $paramname = 'id'; // Name of param key to open the card $mode = 'emailfromuser'; $trackid = 'use'.$id; diff --git a/htdocs/website/websiteaccount_card.php b/htdocs/website/websiteaccount_card.php index 2241b128dee..6a151a71519 100644 --- a/htdocs/website/websiteaccount_card.php +++ b/htdocs/website/websiteaccount_card.php @@ -97,7 +97,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - $trigger_name = 'WEBSITEACCOUNT_SENTBYMAIL'; + $triggersendname = 'WEBSITEACCOUNT_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_WEBSITEACCOUNT_TO'; $trackid = 'websiteaccount'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; diff --git a/htdocs/zapier/hook_card.php b/htdocs/zapier/hook_card.php index 1070a02af9d..a2d82904f58 100644 --- a/htdocs/zapier/hook_card.php +++ b/htdocs/zapier/hook_card.php @@ -138,7 +138,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - $trigger_name = 'MYOBJECT_SENTBYMAIL'; + $triggersendname = 'MYOBJECT_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_MYOBJECT_TO'; $trackid = 'myobject'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';