diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index 92471c55f84..b7c4807781a 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -108,9 +108,9 @@ class Skeleton_class // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf); + //$result=$interface->call_workflow('MYOBJECT_CREATE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } @@ -217,9 +217,9 @@ class Skeleton_class // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); + //$result=$interface->call_workflow('MYOBJECT_MODIFY',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } @@ -272,9 +272,9 @@ class Skeleton_class // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); + //$result=$interface->call_workflow('MYOBJECT_DELETE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php index 04c3a9a2bee..68cd384e51e 100644 --- a/htdocs/adherents/adherent.class.php +++ b/htdocs/adherents/adherent.class.php @@ -327,9 +327,9 @@ class Adherent extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MEMBER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -546,9 +546,9 @@ class Adherent extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_MODIFY',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MEMBER_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -670,9 +670,9 @@ class Adherent extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MEMBER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -795,9 +795,9 @@ class Adherent extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_NEW_PASSWORD',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MEMBER_NEW_PASSWORD',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -1239,9 +1239,9 @@ class Adherent extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_SUBSCRIPTION',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MEMBER_SUBSCRIPTION',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -1294,9 +1294,9 @@ class Adherent extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_VALIDATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MEMBER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -1342,9 +1342,9 @@ class Adherent extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_RESILIATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MEMBER_RESILIATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/categories/categorie.class.php b/htdocs/categories/categorie.class.php index 99a462afb9d..1d6bee7270c 100644 --- a/htdocs/categories/categorie.class.php +++ b/htdocs/categories/categorie.class.php @@ -169,9 +169,9 @@ class Categorie } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CATEGORY_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('CATEGORY_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -249,9 +249,9 @@ class Categorie $this->db->commit(); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CATEGORY_MODIFY',$this,$user,$langs,$conf); + $result=$interface->call_workflow('CATEGORY_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -303,9 +303,9 @@ class Categorie else { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CATEGORY_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('CATEGORY_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/comm/action/actioncomm.class.php b/htdocs/comm/action/actioncomm.class.php index bd7a4b2c51a..00007655c6e 100644 --- a/htdocs/comm/action/actioncomm.class.php +++ b/htdocs/comm/action/actioncomm.class.php @@ -189,9 +189,9 @@ class ActionComm if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ACTION_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('ACTION_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index a7cf0850a27..ac21a557571 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -549,9 +549,9 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] $propal->propalrowid=$propal->id; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($db); - $result=$interface->run_triggers('PROPAL_SENTBYMAIL',$propal,$user,$langs,$conf); + $result=$interface->call_workflow('PROPAL_SENTBYMAIL',$propal,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/comm/propal/propal.class.php b/htdocs/comm/propal/propal.class.php index 9c755309ae6..b5bd23e0f96 100644 --- a/htdocs/comm/propal/propal.class.php +++ b/htdocs/comm/propal/propal.class.php @@ -459,9 +459,9 @@ class Propal extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result = $interface->run_triggers('LINEPROPAL_UPDATE',$this,$user,$langs,$conf); + $result = $interface->call_workflow('LINEPROPAL_UPDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -665,9 +665,9 @@ class Propal extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PROPAL_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PROPAL_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -976,9 +976,9 @@ class Propal extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PROPAL_VALIDATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PROPAL_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -1249,9 +1249,9 @@ class Propal extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_PROPALSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PROPAL_CLOSE_SIGNED',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PROPAL_CLOSE_SIGNED',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -1260,9 +1260,9 @@ class Propal extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_PROPALSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PROPAL_CLOSE_REFUSED',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PROPAL_CLOSE_REFUSED',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -1623,9 +1623,9 @@ class Propal extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PROPAL_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PROPAL_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // End call triggers } @@ -2309,9 +2309,9 @@ class PropaleLigne if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result = $interface->run_triggers('LINEPROPAL_INSERT',$this,$user,$langs,$conf); + $result = $interface->call_workflow('LINEPROPAL_INSERT',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index d43d1dea657..373eb33bcf1 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -328,9 +328,9 @@ class Commande extends CommonObject if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_VALIDATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('ORDER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -451,9 +451,9 @@ class Commande extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_REOPEN',$this,$user,$langs,$conf); + $result=$interface->call_workflow('BILL_REOPEN',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -700,9 +700,9 @@ class Commande extends CommonObject } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('ORDER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -1893,9 +1893,9 @@ class Commande extends CommonObject $this->update_price(); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINEORDER_UPDATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('LINEORDER_UPDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -1987,9 +1987,9 @@ class Commande extends CommonObject if ($err == 0) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('ORDER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -2484,9 +2484,9 @@ class OrderLine if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINEORDER_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('LINEORDER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -2583,9 +2583,9 @@ class OrderLine if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINEORDER_INSERT',$this,$user,$langs,$conf); + $result=$interface->call_workflow('LINEORDER_INSERT',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index b05a943ced8..420185c8cc9 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -944,9 +944,9 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] $commande->orderrowid=$commande->id; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($db); - $result=$interface->run_triggers('ORDER_SENTBYMAIL',$commande,$user,$langs,$conf); + $result=$interface->call_workflow('ORDER_SENTBYMAIL',$commande,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/compta/bank/bankcateg.class.php b/htdocs/compta/bank/bankcateg.class.php index 93f902061d5..289c0d00d4c 100644 --- a/htdocs/compta/bank/bankcateg.class.php +++ b/htdocs/compta/bank/bankcateg.class.php @@ -103,9 +103,9 @@ class BankCateg // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf); + //$result=$interface->call_workflow('MYOBJECT_CREATE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } @@ -207,9 +207,9 @@ class BankCateg // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); + //$result=$interface->call_workflow('MYOBJECT_MODIFY',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } @@ -263,9 +263,9 @@ class BankCateg // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); + //$result=$interface->call_workflow('MYOBJECT_DELETE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } diff --git a/htdocs/compta/chargesociales.class.php b/htdocs/compta/chargesociales.class.php index e86a9733fe2..f1ad616ac53 100644 --- a/htdocs/compta/chargesociales.class.php +++ b/htdocs/compta/chargesociales.class.php @@ -584,9 +584,9 @@ class PaiementCharge extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); + //$result=$interface->call_workflow('MYOBJECT_MODIFY',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } @@ -639,9 +639,9 @@ class PaiementCharge extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); + //$result=$interface->call_workflow('MYOBJECT_DELETE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 9007e0413b1..92e999dfae0 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1365,9 +1365,9 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['a $fac->facid=$fac->id; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($db); - $result=$interface->run_triggers('BILL_SENTBYMAIL',$fac,$user,$langs,$conf); + $result=$interface->call_workflow('BILL_SENTBYMAIL',$fac,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/compta/facture/facture.class.php b/htdocs/compta/facture/facture.class.php index a8f8d09caea..f9e3fd14a48 100644 --- a/htdocs/compta/facture/facture.class.php +++ b/htdocs/compta/facture/facture.class.php @@ -340,9 +340,9 @@ class Facture extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('BILL_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -823,9 +823,9 @@ class Facture extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); + //$result=$interface->call_workflow('MYOBJECT_MODIFY',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } @@ -1014,9 +1014,9 @@ class Facture extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('BILL_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -1140,9 +1140,9 @@ class Facture extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_PAYED',$this,$user,$langs,$conf); + $result=$interface->call_workflow('BILL_PAYED',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -1196,9 +1196,9 @@ class Facture extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_UNPAYED',$this,$user,$langs,$conf); + $result=$interface->call_workflow('BILL_UNPAYED',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -1258,9 +1258,9 @@ class Facture extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_CANCEL',$this,$user,$langs,$conf); + $result=$interface->call_workflow('BILL_CANCEL',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -1466,9 +1466,9 @@ class Facture extends CommonObject if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_VALIDATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('BILL_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -1839,9 +1839,9 @@ class Facture extends CommonObject $result=$this->update_price(); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result = $interface->run_triggers('LINEBILL_DELETE',$this,$user,$langs,$conf); + $result = $interface->call_workflow('LINEBILL_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -3097,9 +3097,9 @@ class FactureLigne if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result = $interface->run_triggers('LINEBILL_INSERT',$this,$user,$langs,$conf); + $result = $interface->call_workflow('LINEBILL_INSERT',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -3166,9 +3166,9 @@ class FactureLigne if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result = $interface->run_triggers('LINEBILL_UPDATE',$this,$user,$langs,$conf); + $result = $interface->call_workflow('LINEBILL_UPDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } diff --git a/htdocs/compta/tva/tva.class.php b/htdocs/compta/tva/tva.class.php index 210380f6ac9..9843c39d776 100644 --- a/htdocs/compta/tva/tva.class.php +++ b/htdocs/compta/tva/tva.class.php @@ -125,9 +125,9 @@ class Tva extends CommonObject $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."tva"); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MYOBJECT_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -193,9 +193,9 @@ class Tva extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MYOBJECT_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -291,9 +291,9 @@ class Tva extends CommonObject } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MYOBJECT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/contact/contact.class.php b/htdocs/contact/contact.class.php index 987bcc60654..d7a4c24629a 100644 --- a/htdocs/contact/contact.class.php +++ b/htdocs/contact/contact.class.php @@ -120,9 +120,9 @@ class Contact extends CommonObject } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTACT_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('CONTACT_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -193,9 +193,9 @@ class Contact extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTACT_MODIFY',$this,$user,$langs,$conf); + $result=$interface->call_workflow('CONTACT_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -628,9 +628,9 @@ class Contact extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTACT_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('CONTACT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/contrat/contrat.class.php b/htdocs/contrat/contrat.class.php index c9851ba42c9..7121bf3d4d1 100644 --- a/htdocs/contrat/contrat.class.php +++ b/htdocs/contrat/contrat.class.php @@ -116,9 +116,9 @@ class Contrat extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_SERVICE_ACTIVATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('CONTRACT_SERVICE_ACTIVATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -161,9 +161,9 @@ class Contrat extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_SERVICE_CLOSE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('CONTRACT_SERVICE_CLOSE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -247,9 +247,9 @@ class Contrat extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_CONTRACTSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_VALIDATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('CONTRACT_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -570,9 +570,9 @@ class Contrat extends CommonObject if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('CONTRACT_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -747,9 +747,9 @@ class Contrat extends CommonObject if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('CONTRACT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -994,9 +994,9 @@ class Contrat extends CommonObject } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACTLINE_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('CONTRACTLINE_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -1699,9 +1699,9 @@ class ContratLigne if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MYOBJECT_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } diff --git a/htdocs/ecm/ecmdirectory.class.php b/htdocs/ecm/ecmdirectory.class.php index 27b2aa4558f..324908e8515 100644 --- a/htdocs/ecm/ecmdirectory.class.php +++ b/htdocs/ecm/ecmdirectory.class.php @@ -147,9 +147,9 @@ class EcmDirectory // extends CommonObject $result=create_exdir($dir); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MYECMDIR_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MYECMDIR_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -215,9 +215,9 @@ class EcmDirectory // extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MYECMDIR_MODIFY',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MYECMDIR_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -361,9 +361,9 @@ class EcmDirectory // extends CommonObject if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MYECMDIR_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('MYECMDIR_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } diff --git a/htdocs/expedition/expedition.class.php b/htdocs/expedition/expedition.class.php index 146d8ee154b..f7fbfc71d25 100644 --- a/htdocs/expedition/expedition.class.php +++ b/htdocs/expedition/expedition.class.php @@ -447,9 +447,9 @@ class Expedition extends CommonObject if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SHIPPING',$this,$user,$langs,$conf); + $result=$interface->call_workflow('ORDER_SHIPPING',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } diff --git a/htdocs/exports/export.class.php b/htdocs/exports/export.class.php index f3a70a53f68..25659f1b3b9 100644 --- a/htdocs/exports/export.class.php +++ b/htdocs/exports/export.class.php @@ -401,9 +401,9 @@ class Export // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); + //$result=$interface->call_workflow('MYOBJECT_DELETE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } diff --git a/htdocs/fichinter/fichinter.class.php b/htdocs/fichinter/fichinter.class.php index 0baaf7b4f22..f2cb9a0f5e0 100644 --- a/htdocs/fichinter/fichinter.class.php +++ b/htdocs/fichinter/fichinter.class.php @@ -287,9 +287,9 @@ class Fichinter extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('FICHEINTER_VALIDATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('FICHEINTER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/fourn/facture/paiementfourn.class.php b/htdocs/fourn/facture/paiementfourn.class.php index fa336cfbce9..b5506de38a0 100644 --- a/htdocs/fourn/facture/paiementfourn.class.php +++ b/htdocs/fourn/facture/paiementfourn.class.php @@ -175,9 +175,9 @@ class PaiementFourn if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PAYMENT_SUPPLIER_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PAYMENT_SUPPLIER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } diff --git a/htdocs/fourn/fournisseur.commande.class.php b/htdocs/fourn/fournisseur.commande.class.php index 30a1a9110d9..948ee6a5f3b 100644 --- a/htdocs/fourn/fournisseur.commande.class.php +++ b/htdocs/fourn/fournisseur.commande.class.php @@ -303,9 +303,9 @@ class CommandeFournisseur extends Commande if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_VALIDATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('ORDER_SUPPLIER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -357,9 +357,9 @@ class CommandeFournisseur extends Commande $this->log($user, $statut, time()); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_VALIDATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('ORDER_SUPPLIER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -585,9 +585,9 @@ class CommandeFournisseur extends Commande if ($error == 0) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_APPROVE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('ORDER_SUPPLIER_APPROVE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -643,9 +643,9 @@ class CommandeFournisseur extends Commande if ($error == 0) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_REFUSE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('ORDER_SUPPLIER_REFUSE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -745,9 +745,9 @@ class CommandeFournisseur extends Commande $this->log($user, 0, time()); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('ORDER_SUPPLIER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -1057,9 +1057,9 @@ class CommandeFournisseur extends Commande if ($err == 0) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('ORDER_SUPPLIER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/fourn/fournisseur.facture.class.php b/htdocs/fourn/fournisseur.facture.class.php index 8f15623fecd..c1dfa32a9be 100644 --- a/htdocs/fourn/fournisseur.facture.class.php +++ b/htdocs/fourn/fournisseur.facture.class.php @@ -465,9 +465,9 @@ class FactureFournisseur extends Facture $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_SUPPLIER_PAYED',$this,$user,$langs,$conf); + $result=$interface->call_workflow('BILL_SUPPLIER_PAYED',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -517,9 +517,9 @@ class FactureFournisseur extends Facture $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_SUPPLIER_UNPAYED',$this,$user,$langs,$conf); + $result=$interface->call_workflow('BILL_SUPPLIER_UNPAYED',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -591,9 +591,9 @@ class FactureFournisseur extends Facture if ($error == 0) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_SUPPLIER_VALIDATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('BILL_SUPPLIER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } diff --git a/htdocs/imports/import.class.php b/htdocs/imports/import.class.php index 90b1e8f37e5..ce27f548e8e 100644 --- a/htdocs/imports/import.class.php +++ b/htdocs/imports/import.class.php @@ -313,9 +313,9 @@ class Import // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); + //$result=$interface->call_workflow('MYOBJECT_DELETE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } diff --git a/htdocs/includes/modules/modWorkflow.class.php b/htdocs/includes/modules/modWorkflow.class.php index 63ff00edd94..ef6e96e781b 100644 --- a/htdocs/includes/modules/modWorkflow.class.php +++ b/htdocs/includes/modules/modWorkflow.class.php @@ -57,8 +57,8 @@ class modWorkflow extends DolibarrModules $this->name = preg_replace('/^mod/i','',get_class($this)); // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) $this->description = "Workflow management"; - // Can be enabled / disabled only in the main company with superadmin account - $this->core_enabled = 0; + // Can't be disabled + $this->always_enabled = 1; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = 'development'; // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1e119116244..b68bf5cc37f 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -328,9 +328,9 @@ if (! defined('NOLOGIN')) $test=false; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($db); - $result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,$_POST["entity"]); + $result=$interface->call_workflow('USER_LOGIN_FAILED',$user,$user,$langs,$conf,$_POST["entity"]); if ($result < 0) { $error++; } // Fin appel triggers } @@ -386,9 +386,9 @@ if (! defined('NOLOGIN')) $_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadLoginPassword"); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($db); - $result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,$_POST["entity"]); + $result=$interface->call_workflow('USER_LOGIN_FAILED',$user,$user,$langs,$conf,$_POST["entity"]); if ($result < 0) { $error++; } // Fin appel triggers } @@ -426,9 +426,9 @@ if (! defined('NOLOGIN')) } // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($db); - $result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,$_POST["entity"]); + $result=$interface->call_workflow('USER_LOGIN_FAILED',$user,$user,$langs,$conf,$_POST["entity"]); if ($result < 0) { $error++; } // End call triggers @@ -466,9 +466,9 @@ if (! defined('NOLOGIN')) } // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($db); - $result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,(isset($_POST["entity"])?$_POST["entity"]:0)); + $result=$interface->call_workflow('USER_LOGIN_FAILED',$user,$user,$langs,$conf,(isset($_POST["entity"])?$_POST["entity"]:0)); if ($result < 0) { $error++; } // End call triggers @@ -494,9 +494,9 @@ if (! defined('NOLOGIN')) $user->update_last_login_date(); // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($db); - $result=$interface->run_triggers('USER_LOGIN',$user,$user,$langs,$conf,$_POST["entity"]); + $result=$interface->call_workflow('USER_LOGIN',$user,$user,$langs,$conf,$_POST["entity"]); if ($result < 0) { $error++; } // End call triggers diff --git a/htdocs/paiement.class.php b/htdocs/paiement.class.php index 09ff8890bed..0c819c34f9c 100644 --- a/htdocs/paiement.class.php +++ b/htdocs/paiement.class.php @@ -180,9 +180,9 @@ class Paiement if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PAYMENT_CUSTOMER_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PAYMENT_CUSTOMER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } diff --git a/htdocs/product/product.class.php b/htdocs/product/product.class.php index 86098e25d9a..8ced98b5caf 100644 --- a/htdocs/product/product.class.php +++ b/htdocs/product/product.class.php @@ -557,9 +557,9 @@ class Product extends CommonObject } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PRODUCT_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PRODUCT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/projet/project.class.php b/htdocs/projet/project.class.php index b7d1837066e..f6dd8508b7e 100644 --- a/htdocs/projet/project.class.php +++ b/htdocs/projet/project.class.php @@ -118,9 +118,9 @@ class Project extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PROJECT_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PROJECT_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // End call triggers } @@ -168,9 +168,9 @@ class Project extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PROJECT_MODIFY',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PROJECT_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // End call triggers } @@ -393,9 +393,9 @@ class Project extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PROJECT_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PROJECT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // End call triggers } @@ -436,9 +436,9 @@ class Project extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PROJECT_VALIDATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PROJECT_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -489,9 +489,9 @@ class Project extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PROJECT_CLOSE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('PROJECT_CLOSE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/projet/tasks/task.class.php b/htdocs/projet/tasks/task.class.php index c184c1a21b6..a250c997838 100644 --- a/htdocs/projet/tasks/task.class.php +++ b/htdocs/projet/tasks/task.class.php @@ -133,9 +133,9 @@ class Task extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TASK_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('TASK_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // End call triggers } @@ -272,9 +272,9 @@ class Task extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TASK_MODIFY',$this,$user,$langs,$conf); + $result=$interface->call_workflow('TASK_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // End call triggers } @@ -333,9 +333,9 @@ class Task extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TASK_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('TASK_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // End call triggers } @@ -627,9 +627,9 @@ class Task extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TASK_TIMESPENT_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('TASK_TIMESPENT_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // End call triggers } @@ -731,9 +731,9 @@ class Task extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TASK_TIMESPENT_MODIFY',$this,$user,$langs,$conf); + $result=$interface->call_workflow('TASK_TIMESPENT_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // End call triggers } @@ -792,9 +792,9 @@ class Task extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TASK_TIMESPENT_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('TASK_TIMESPENT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // End call triggers } diff --git a/htdocs/societe/societe.class.php b/htdocs/societe/societe.class.php index 06a73fb407d..5a2bc139528 100644 --- a/htdocs/societe/societe.class.php +++ b/htdocs/societe/societe.class.php @@ -213,9 +213,9 @@ class Societe extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_COMPANYCREATE=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('COMPANY_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('COMPANY_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -489,9 +489,9 @@ class Societe extends CommonObject if ($call_trigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('COMPANY_MODIFY',$this,$user,$langs,$conf); + $result=$interface->call_workflow('COMPANY_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -889,9 +889,9 @@ class Societe extends CommonObject if ($sqr == 4) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('COMPANY_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('COMPANY_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers diff --git a/htdocs/user/group/usergroup.class.php b/htdocs/user/group/usergroup.class.php index 37118d7adda..8dbdc01ace1 100644 --- a/htdocs/user/group/usergroup.class.php +++ b/htdocs/user/group/usergroup.class.php @@ -465,9 +465,9 @@ class UserGroup extends CommonObject if ($result) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('USER_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('USER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -502,9 +502,9 @@ class UserGroup extends CommonObject if ($this->update(1) < 0) return -2; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('GROUP_CREATE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('GROUP_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -541,9 +541,9 @@ class UserGroup extends CommonObject if (!$error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('GROUP_MODIFY',$this,$user,$langs,$conf); + $result=$interface->call_workflow('GROUP_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } diff --git a/htdocs/user/user.class.php b/htdocs/user/user.class.php index 654afce40aa..56631e30273 100644 --- a/htdocs/user/user.class.php +++ b/htdocs/user/user.class.php @@ -614,9 +614,9 @@ class User extends CommonObject if ($result) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('USER_ENABLEDISABLE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('USER_ENABLEDISABLE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -670,9 +670,9 @@ class User extends CommonObject if ($result) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('USER_DELETE',$this,$user,$langs,$conf); + $result=$interface->call_workflow('USER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -771,9 +771,9 @@ class User extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface = new Interfaces($this->db); - $result = $interface->run_triggers('USER_CREATE',$this,$user,$langs,$conf); + $result = $interface->call_workflow('USER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -1109,9 +1109,9 @@ class User extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('USER_MODIFY',$this,$user,$langs,$conf); + $result=$interface->call_workflow('USER_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers } @@ -1254,9 +1254,9 @@ class User extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/workflow/class/interfaces.class.php"); $interface=new Interfaces($this->db); - $result=$interface->run_triggers('USER_NEW_PASSWORD',$this,$user,$langs,$conf); + $result=$interface->call_workflow('USER_NEW_PASSWORD',$this,$user,$langs,$conf); if ($result < 0) $this->errors=$interface->errors; // Fin appel triggers } diff --git a/htdocs/core/interfaces.class.php b/htdocs/workflow/class/interfaces.class.php similarity index 96% rename from htdocs/core/interfaces.class.php rename to htdocs/workflow/class/interfaces.class.php index 996c84c6d17..deb8f8dfbc6 100644 --- a/htdocs/core/interfaces.class.php +++ b/htdocs/workflow/class/interfaces.class.php @@ -19,19 +19,21 @@ */ /** - * \file htdocs/interfaces.class.php - * \ingroup core + * \file htdocs/workflow/class/interfaces.class.php + * \ingroup workflow * \brief Fichier de la classe de gestion des triggers * \version $Id$ */ +require_once(DOL_DOCUMENT_ROOT ."/workflow/class/workflow.class.php"); + /** * \class Interfaces * \brief Classe de la gestion des triggers */ -class Interfaces +class Interfaces extends Workflow { var $dir; // Directory with all core and external triggers files var $errors = array(); // Array for errors diff --git a/htdocs/workflow/class/workflow.class.php b/htdocs/workflow/class/workflow.class.php new file mode 100644 index 00000000000..d46605748b8 --- /dev/null +++ b/htdocs/workflow/class/workflow.class.php @@ -0,0 +1,56 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \file htdocs/workflow/class/workflow.class.php + * \ingroup workflow + * \brief Fichier de la classe de gestion des workflow + * \version $Id$ + */ + + +/** + * \class Interfaces + * \brief Classe de la gestion des workflow + */ + +class Workflow +{ + var $errors = array(); // Array for errors + + /** + * \brief Constructeur. + * \param DB handler d'acces base + */ + function Workflow($DB) + { + $this->db = $DB ; + } + + /** + * \brief Fonction appelee lors du declenchement d'un evenement Dolibarr. + * Cette fonction declenche la gestion du workflow. + * TODO under construction + */ + function call_workflow($action,$object,$user,$langs,$conf) + { + $this->run_triggers($action,$object,$user,$langs,$conf); + } + +} +?>