diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index 8144e0efb39..92471c55f84 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -108,7 +108,7 @@ class Skeleton_class // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); //$interface=new Interfaces($this->db); //$result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -217,7 +217,7 @@ class Skeleton_class // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); //$interface=new Interfaces($this->db); //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -272,7 +272,7 @@ class Skeleton_class // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); //$interface=new Interfaces($this->db); //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php index 108f8d332c5..04c3a9a2bee 100644 --- a/htdocs/adherents/adherent.class.php +++ b/htdocs/adherents/adherent.class.php @@ -327,7 +327,7 @@ class Adherent extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MEMBER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -546,7 +546,7 @@ class Adherent extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MEMBER_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -670,7 +670,7 @@ class Adherent extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MEMBER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -795,7 +795,7 @@ class Adherent extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MEMBER_NEW_PASSWORD',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1239,7 +1239,7 @@ class Adherent extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MEMBER_SUBSCRIPTION',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1294,7 +1294,7 @@ class Adherent extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MEMBER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1342,7 +1342,7 @@ class Adherent extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MEMBER_RESILIATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/categories/categorie.class.php b/htdocs/categories/categorie.class.php index 65c9fc3e503..8dda84b91d6 100644 --- a/htdocs/categories/categorie.class.php +++ b/htdocs/categories/categorie.class.php @@ -169,7 +169,7 @@ class Categorie } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('CATEGORY_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -249,7 +249,7 @@ class Categorie $this->db->commit(); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('CATEGORY_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -303,7 +303,7 @@ class Categorie else { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('CATEGORY_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/comm/action/actioncomm.class.php b/htdocs/comm/action/actioncomm.class.php index 54325914bb1..c9750e87768 100644 --- a/htdocs/comm/action/actioncomm.class.php +++ b/htdocs/comm/action/actioncomm.class.php @@ -189,7 +189,7 @@ class ActionComm if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('ACTION_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 9a8fad4cb25..d25c2f5b307 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -550,7 +550,7 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] $propal->propalrowid=$propal->id; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($db); $result=$interface->run_triggers('PROPAL_SENTBYMAIL',$propal,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/comm/propal/propal.class.php b/htdocs/comm/propal/propal.class.php index 028cb94c547..433089203ff 100644 --- a/htdocs/comm/propal/propal.class.php +++ b/htdocs/comm/propal/propal.class.php @@ -458,7 +458,7 @@ class Propal extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result = $interface->run_triggers('LINEPROPAL_UPDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -664,7 +664,7 @@ class Propal extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PROPAL_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -971,7 +971,7 @@ class Propal extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PROPAL_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1244,7 +1244,7 @@ class Propal extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_PROPALSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PROPAL_CLOSE_SIGNED',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1255,7 +1255,7 @@ class Propal extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_PROPALSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PROPAL_CLOSE_REFUSED',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1612,7 +1612,7 @@ class Propal extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PROPAL_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -2296,7 +2296,7 @@ class PropaleLigne if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result = $interface->run_triggers('LINEPROPAL_INSERT',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index fbf4fa4a6ca..3cce37ef3ce 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -327,7 +327,7 @@ class Commande extends CommonObject if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('ORDER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -450,7 +450,7 @@ class Commande extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('BILL_REOPEN',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -699,7 +699,7 @@ class Commande extends CommonObject } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('ORDER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1892,7 +1892,7 @@ class Commande extends CommonObject $this->update_price(); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('LINEORDER_UPDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1986,7 +1986,7 @@ class Commande extends CommonObject if ($err == 0) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('ORDER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -2484,7 +2484,7 @@ class OrderLine if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('LINEORDER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -2583,7 +2583,7 @@ class OrderLine if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('LINEORDER_INSERT',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index cc0886a0519..1a26dd61e2b 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -944,7 +944,7 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] $commande->orderrowid=$commande->id; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($db); $result=$interface->run_triggers('ORDER_SENTBYMAIL',$commande,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/compta/bank/bankcateg.class.php b/htdocs/compta/bank/bankcateg.class.php index 0f135469447..93f902061d5 100644 --- a/htdocs/compta/bank/bankcateg.class.php +++ b/htdocs/compta/bank/bankcateg.class.php @@ -103,7 +103,7 @@ class BankCateg // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); //$interface=new Interfaces($this->db); //$result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -207,7 +207,7 @@ class BankCateg // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); //$interface=new Interfaces($this->db); //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -263,7 +263,7 @@ class BankCateg // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); //$interface=new Interfaces($this->db); //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/compta/chargesociales.class.php b/htdocs/compta/chargesociales.class.php index a0a6cb77904..e86a9733fe2 100644 --- a/htdocs/compta/chargesociales.class.php +++ b/htdocs/compta/chargesociales.class.php @@ -584,7 +584,7 @@ class PaiementCharge extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); //$interface=new Interfaces($this->db); //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -639,7 +639,7 @@ class PaiementCharge extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); //$interface=new Interfaces($this->db); //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 8a38b8367a2..6dfa9f0040b 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1365,7 +1365,7 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['a $fac->facid=$fac->id; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($db); $result=$interface->run_triggers('BILL_SENTBYMAIL',$fac,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/compta/facture/facture.class.php b/htdocs/compta/facture/facture.class.php index 3166eacc9f0..a35e30f24e6 100644 --- a/htdocs/compta/facture/facture.class.php +++ b/htdocs/compta/facture/facture.class.php @@ -339,7 +339,7 @@ class Facture extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('BILL_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -822,7 +822,7 @@ class Facture extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); //$interface=new Interfaces($this->db); //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1013,7 +1013,7 @@ class Facture extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('BILL_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1139,7 +1139,7 @@ class Facture extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('BILL_PAYED',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1195,7 +1195,7 @@ class Facture extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('BILL_UNPAYED',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1257,7 +1257,7 @@ class Facture extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('BILL_CANCEL',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1463,7 +1463,7 @@ class Facture extends CommonObject if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('BILL_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1831,7 +1831,7 @@ class Facture extends CommonObject $result=$this->update_price(); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result = $interface->run_triggers('LINEBILL_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -3092,7 +3092,7 @@ class FactureLigne if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result = $interface->run_triggers('LINEBILL_INSERT',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -3161,7 +3161,7 @@ class FactureLigne if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result = $interface->run_triggers('LINEBILL_UPDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/compta/tva/tva.class.php b/htdocs/compta/tva/tva.class.php index 5b24a52ff2e..210380f6ac9 100644 --- a/htdocs/compta/tva/tva.class.php +++ b/htdocs/compta/tva/tva.class.php @@ -125,7 +125,7 @@ class Tva extends CommonObject $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."tva"); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -193,7 +193,7 @@ class Tva extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -291,7 +291,7 @@ class Tva extends CommonObject } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/contact/contact.class.php b/htdocs/contact/contact.class.php index 2f72135a593..987bcc60654 100644 --- a/htdocs/contact/contact.class.php +++ b/htdocs/contact/contact.class.php @@ -120,7 +120,7 @@ class Contact extends CommonObject } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('CONTACT_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -193,7 +193,7 @@ class Contact extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('CONTACT_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -628,7 +628,7 @@ class Contact extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('CONTACT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/contrat/contrat.class.php b/htdocs/contrat/contrat.class.php index ae9e1828e99..7b9f3fd41a5 100644 --- a/htdocs/contrat/contrat.class.php +++ b/htdocs/contrat/contrat.class.php @@ -114,7 +114,7 @@ class Contrat extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('CONTRACT_SERVICE_ACTIVATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -159,7 +159,7 @@ class Contrat extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('CONTRACT_SERVICE_CLOSE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -245,7 +245,7 @@ class Contrat extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_CONTRACTSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('CONTRACT_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -568,7 +568,7 @@ class Contrat extends CommonObject if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('CONTRACT_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -745,7 +745,7 @@ class Contrat extends CommonObject if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('CONTRACT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -992,7 +992,7 @@ class Contrat extends CommonObject } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('CONTRACTLINE_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1693,7 +1693,7 @@ class ContratLigne if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/interfaces.class.php b/htdocs/core/interfaces.class.php similarity index 100% rename from htdocs/interfaces.class.php rename to htdocs/core/interfaces.class.php diff --git a/htdocs/ecm/ecmdirectory.class.php b/htdocs/ecm/ecmdirectory.class.php index 7a45f682fc8..27b2aa4558f 100644 --- a/htdocs/ecm/ecmdirectory.class.php +++ b/htdocs/ecm/ecmdirectory.class.php @@ -1,675 +1,675 @@ - - * Copyright (C) 2008-2009 Regis Houssin - * - * 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/ecm/ecm_directories.class.php - * \ingroup ecm - * \brief This file is an example for a class file - * \version $Id$ - * \author Laurent Destailleur - * \remarks Initialy built by build_class_from_table on 2008-02-24 19:24 - */ - -/** - * \class EcmDirectory - * \brief Class to manage ECM directories - * \remarks Initialy built by build_class_from_table on 2008-02-24 19:24 - */ -class EcmDirectory // extends CommonObject -{ - var $db; //!< To store db handler - var $error; //!< To return error code (or message) - var $errors=array(); //!< To return several error codes (or messages) - //var $element='ecm_directories'; //!< Id that identify managed objects - //var $table_element='ecm_directories'; //!< Name of table without prefix where object is stored - - var $id; - - var $label; - var $fk_parent; - var $description; - var $cachenbofdoc; - var $date_c; - var $date_m; - - var $cats=array(); - var $motherof=array(); - - - /** - * \brief Constructor - * \param DB Database handler - */ - function EcmDirectory($DB) - { - $this->db = $DB; - return 1; - } - - - /** - * \brief Create in database - * \param user User that create - * \return int <0 si ko, >0 si ok - */ - function create($user) - { - global $conf, $langs; - - $now=time(); - - // Clean parameters - $this->label=dol_string_nospecial(trim($this->label)); - $this->fk_parent=trim($this->fk_parent); - $this->description=trim($this->description); - if (! $this->cachenbofdoc) $this->cachenbofdoc=0; - $this->date_c=$now; - $this->fk_user_c=$user->id; - if ($this->fk_parent <= 0) $this->fk_parent=0; - - // Check if same directory does not exists with this name - $relativepath=$this->label; - if ($this->fk_parent) - { - $parent = new ECMDirectory($this->db); - $parent->fetch($this->fk_parent); - $relativepath=$parent->getRelativePath().$relativepath; - } - $relativepath=preg_replace('/([\/])+/i','/',$relativepath); // Avoid duplicate / or \ - //print $relativepath.'
'; - - $cat = new ECMDirectory($this->db); - $cate_arbo = $cat->get_full_arbo(1); - $pathfound=0; - foreach ($cate_arbo as $key => $categ) - { - $path=preg_replace('/([\s-><\/])+/i','/',$categ['fulllabel']); - //print $path.'
'; - if ($path == $relativepath) - { - $pathfound=1; - break; - } - } - - if ($pathfound) - { - $this->error="ErrorDirAlreadyExists"; - dol_syslog("EcmDirectories::create ".$this->error, LOG_WARNING); - return -1; - } - else - { - $this->db->begin(); - - // Insert request - $sql = "INSERT INTO ".MAIN_DB_PREFIX."ecm_directories("; - $sql.= "label,"; - $sql.= "entity,"; - $sql.= "fk_parent,"; - $sql.= "description,"; - $sql.= "cachenbofdoc,"; - $sql.= "date_c,"; - $sql.= "fk_user_c"; - $sql.= ") VALUES ("; - $sql.= " '".addslashes($this->label)."',"; - $sql.= " '".$conf->entity."',"; - $sql.= " '".$this->fk_parent."',"; - $sql.= " '".addslashes($this->description)."',"; - $sql.= " ".($this->cachenbofdoc).","; - $sql.= " ".$this->db->idate($this->date_c).","; - $sql.= " '".$this->fk_user_c."'"; - $sql.= ")"; - - dol_syslog("EcmDirectories::create sql=".$sql, LOG_DEBUG); - $resql=$this->db->query($sql); - if ($resql) - { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."ecm_directories"); - - $dir=$conf->ecm->dir_output.'/'.$this->getRelativePath(); - $result=create_exdir($dir); - - // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MYECMDIR_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers - - if (! $error) - { - $this->db->commit(); - return $this->id; - } - else - { - $this->db->rollback(); - return -1; - } - } - else - { - $this->error="Error ".$this->db->lasterror(); - dol_syslog("EcmDirectories::create ".$this->error, LOG_ERR); - $this->db->rollback(); - return -1; - } - } - } - - /** - * \brief Update database - * \param user User that modify - * \param notrigger 0=no, 1=yes (no update trigger) - * \return int <0 if KO, >0 if OK - */ - function update($user=0, $notrigger=0) - { - global $conf, $langs; - - $error=0; - - // Clean parameters - $this->label=trim($this->label); - $this->fk_parent=trim($this->fk_parent); - $this->description=trim($this->description); - - // Check parameters - // Put here code to add control on parameters values - - $this->db->begin(); - - // Update request - $sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories SET"; - $sql.= " label='".addslashes($this->label)."',"; - $sql.= " fk_parent='".$this->fk_parent."',"; - $sql.= " description='".addslashes($this->description)."'"; - $sql.= " WHERE rowid=".$this->id; - - dol_syslog("EcmDirectories::update sql=".$sql, LOG_DEBUG); - $resql = $this->db->query($sql); - if (! $resql) - { - $error++; - $this->error="Error ".$this->db->lasterror(); - dol_syslog("EcmDirectories::update ".$this->error, LOG_ERR); - } - - if (! $error && ! $notrigger) - { - // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MYECMDIR_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers - } - - if (! $error) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - - - /** - * \brief Update database - * \sign '+' or '-' - * \return int <0 if KO, >0 if OK - */ - function changeNbOfFiles($sign) - { - global $conf, $langs; - - // Update request - $sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories SET"; - $sql.= " cachenbofdoc = cachenbofdoc ".$sign." 1"; - $sql.= " WHERE rowid = ".$this->id; - - dol_syslog("EcmDirectories::changeNbOfFiles sql=".$sql, LOG_DEBUG); - $resql = $this->db->query($sql); - if (! $resql) - { - $this->error="Error ".$this->db->lasterror(); - dol_syslog("EcmDirectories::changeNbOfFiles ".$this->error, LOG_ERR); - return -1; - } - - return 1; - } - - - /** - * \brief Load object in memory from database - * \param id id object - * \return int <0 if KO, 0 if not found, >0 if OK - */ - function fetch($id) - { - $sql = "SELECT"; - $sql.= " t.rowid,"; - $sql.= " t.label,"; - $sql.= " t.fk_parent,"; - $sql.= " t.description,"; - $sql.= " t.cachenbofdoc,"; - $sql.= " t.fk_user_c,"; - $sql.= " t.fk_user_m,"; - $sql.= " ".$this->db->pdate('t.date_c')." as date_c,"; - $sql.= " ".$this->db->pdate('t.date_m')." as date_m"; - $sql.= " FROM ".MAIN_DB_PREFIX."ecm_directories as t"; - $sql.= " WHERE t.rowid = ".$id; - - dol_syslog("EcmDirectories::fetch sql=".$sql, LOG_DEBUG); - $resql=$this->db->query($sql); - if ($resql) - { - $obj = $this->db->fetch_object($resql); - if ($obj) - { - $this->id = $obj->rowid; - $this->ref = $obj->rowid; - - $this->label = $obj->label; - $this->fk_parent = $obj->fk_parent; - $this->description = $obj->description; - $this->cachenbofdoc = $obj->cachenbofdoc; - $this->fk_user_m = $obj->fk_user_m; - $this->fk_user_c = $obj->fk_user_c; - $this->date_c = $obj->date_c; - $this->date_m = $obj->date_m; - } - - $this->db->free($resql); - - return $obj?1:0; - } - else - { - $this->error="Error ".$this->db->lasterror(); - dol_syslog("EcmDirectories::fetch ".$this->error, LOG_ERR); - return -1; - } - } - - - /** - * \brief Delete object on database and on disk - * \param user User that delete - * \return int <0 if KO, >0 if OK - */ - function delete($user) - { - global $conf, $langs; - - $relativepath=$this->getRelativePath(1); // Ex: dir1/dir2/dir3 - - dol_syslog("EcmDirectories::delete remove directory ".$relativepath); - - $this->db->begin(); - - $sql = "DELETE FROM ".MAIN_DB_PREFIX."ecm_directories"; - $sql.= " WHERE rowid=".$this->id; - - dol_syslog("EcmDirectories::delete sql=".$sql); - $resql = $this->db->query($sql); - if (! $resql) - { - $this->db->rollback(); - $this->error="Error ".$this->db->lasterror(); - dol_syslog("EcmDirectories::delete ".$this->error, LOG_ERR); - return -2; - } - - $file = $conf->ecm->dir_output . "/" . $relativepath; - $result=@dol_delete_dir($file); - - if ($result || ! @is_dir(dol_osencode($file))) - { - $this->db->commit(); - } - else - { - $this->error='ErrorFailedToDeleteDir'; - dol_syslog("EcmDirectories::delete ".$this->error, LOG_ERR); - $this->db->rollback(); - $error++; - } - - if (! $error) - { - // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MYECMDIR_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers - } - - if (! $error) return 1; - else return -1; - } - - - /** - * \brief Initialise object with example values - * \remarks id must be 0 if object instance is a specimen. - */ - function initAsSpecimen() - { - $this->id=0; - - $this->label='MyDirectory'; - $this->fk_parent='0'; - $this->description='This is a directory'; - } - - - /** - * \brief Return directory name you can click (and picto) - * \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul - * \param option Sur quoi pointe le lien - * \return string Chaine avec URL - */ - function getNomUrl($withpicto=0,$option='',$max=0) - { - global $langs; - - $result=''; - - $lien = ''; - if ($option == 'index') $lien = ''; - if ($option == 'indexexpanded') $lien = ''; - if ($option == 'indexnotexpanded') $lien = ''; - $lienfin=''; - - //$picto=DOL_URL_ROOT.'/theme/common/treemenu/folder.gif'; - $picto='dir'; - - $newref=str_replace('_',' ',$this->ref); - $newlabel=$langs->trans("ShowECMSection").': '.$newref; - - if ($withpicto) $result.=($lien.img_object($newlabel,$picto,'',1).$lienfin); - if ($withpicto && $withpicto != 2) $result.=' '; - if ($withpicto != 2) $result.=$lien.($max?dol_trunc($newref,$max,'middle'):$newref).$lienfin; - return $result; - } - - /** - * \brief Return relative path of a directory on disk - * \param force Force reload of full arbo even if already loaded - * \return string Relative physical path - */ - function getRelativePath($force=0) - { - $this->get_full_arbo($force); - - $ret=''; - $idtosearch=$this->id; - $i=0; - do { - // Get index cursor in this->cats for id_mere - $cursorindex=-1; - foreach ($this->cats as $key => $val) - { - if ($this->cats[$key]['id'] == $idtosearch) - { - $cursorindex=$key; - break; - } - } - //print "c=".$idtosearch."-".$cursorindex; - - if ($cursorindex >= 0) - { - // Path is label sanitized (no space and no special char) and concatenated - $ret=dol_sanitizeFileName($this->cats[$cursorindex]['label']).'/'.$ret; - - $idtosearch=$this->cats[$cursorindex]['id_mere']; - $i++; - } - } - while ($cursorindex >= 0 && ! empty($idtosearch) && $i < 100); // i avoid infinite loop - - return $ret; - } - - /** - * \brief Load this->motherof that is array(id_son=>id_parent, ...) - * \return int <0 if KO, >0 if OK - */ - function load_motherof() - { - global $conf; - - $this->motherof=array(); - - // Charge tableau des meres - $sql = "SELECT fk_parent as id_parent, rowid as id_son"; - $sql.= " FROM ".MAIN_DB_PREFIX."ecm_directories"; - $sql.= " WHERE fk_parent != 0"; - $sql.= " AND entity = ".$conf->entity; - - dol_syslog("EcmDirectory::get_full_arbo sql=".$sql); - $resql = $this->db->query($sql); - if ($resql) - { - while ($obj= $this->db->fetch_object($resql)) - { - $this->motherof[$obj->id_son]=$obj->id_parent; - } - return 1; - } - else - { - dol_print_error ($this->db); - return -1; - } - } - - - /** - * \brief Reconstruit l'arborescence des categories sous la forme d'un tableau - * Renvoi un tableau de tableau('id','id_mere',...) trie selon - * arbre et avec: - * id = id de la categorie - * id_mere = id de la categorie mere - * id_children = tableau des id enfant - * label = nom de la categorie - * cachenbofdoc = nb of documents - * date_c = date creation - * fk_user_c = user creation - * login_c = login creation - * fullpath Full path (Added by build_path_from_id_categ call) - * fulllabel Full label (Added by build_path_from_id_categ call) - * level Level of line (Added by build_path_from_id_categ call) - * \param force Force reload of full arbo even if already loaded - * \return array Tableau de array - */ - function get_full_arbo($force=0) - { - global $conf; - - if (empty($force) && $this->full_arbo_loaded) - { - return $this->cats; - } - - // Init this->motherof that is array(id_son=>id_parent, ...) - $this->load_motherof(); - - // Charge tableau des categories - $sql = "SELECT c.rowid as rowid, c.label as label,"; - $sql.= " c.description as description, c.cachenbofdoc,"; - $sql.= " c.fk_user_c,"; - $sql.= " c.date_c,"; - $sql.= " u.login as login_c,"; - $sql.= " ca.rowid as rowid_fille"; - $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; - $sql.= ", ".MAIN_DB_PREFIX."ecm_directories as c"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."ecm_directories as ca"; - $sql.= " ON c.rowid = ca.fk_parent"; - $sql.= " WHERE c.fk_user_c = u.rowid"; - $sql.= " AND c.entity = ".$conf->entity; - $sql.= " ORDER BY c.label, c.rowid"; - - dol_syslog("EcmDirectory::get_full_arbo sql=".$sql); - $resql = $this->db->query ($sql); - if ($resql) - { - $this->cats = array(); - $i=0; - while ($obj = $this->db->fetch_object($resql)) - { - $this->cats[$obj->rowid]['id'] = $obj->rowid; - $this->cats[$obj->rowid]['id_mere'] = $this->motherof[$obj->rowid]; - $this->cats[$obj->rowid]['label'] = $obj->label; - $this->cats[$obj->rowid]['description'] = $obj->description; - $this->cats[$obj->rowid]['cachenbofdoc'] = $obj->cachenbofdoc; - $this->cats[$obj->rowid]['date_c'] = $obj->date_c; - $this->cats[$obj->rowid]['fk_user_c'] = $obj->fk_user_c; - $this->cats[$obj->rowid]['login_c'] = $obj->login_c; - - if ($obj->rowid_fille) - { - if (is_array($this->cats[$obj->rowid]['id_children'])) - { - $newelempos=sizeof($this->cats[$obj->rowid]['id_children']); - //print "this->cats[$i]['id_children'] est deja un tableau de $newelem elements
"; - $this->cats[$obj->rowid]['id_children'][$newelempos]=$obj->rowid_fille; - } - else - { - //print "this->cats[".$obj->rowid."]['id_children'] n'est pas encore un tableau
"; - $this->cats[$obj->rowid]['id_children']=array($obj->rowid_fille); - } - } - $i++; - - } - } - else - { - dol_print_error ($this->db); - return -1; - } - - // On ajoute la propriete fullpath a tous les elements - foreach($this->cats as $key => $val) - { - if (isset($motherof[$key])) continue; - $this->build_path_from_id_categ($key,0); - } - - $this->cats=dol_sort_array($this->cats, 'fulllabel', 'asc', true, false); - $this->full_arbo_loaded=1; - - return $this->cats; - } - - /** - * \brief Calcule les proprietes fullpath et fulllabel d'une categorie - * du tableau this->cats et de toutes ces enfants - * \param id_categ id_categ entry to update - * \param protection Deep counter to avoid infinite loop - */ - function build_path_from_id_categ($id_categ,$protection=0) - { - // Define fullpath - if (isset($this->cats[$id_categ]['id_mere'])) - { - $this->cats[$id_categ]['fullpath'] =$this->cats[$this->cats[$id_categ]['id_mere']]['fullpath']; - $this->cats[$id_categ]['fullpath'].='_'.$id_categ; - $this->cats[$id_categ]['fulllabel'] =$this->cats[$this->cats[$id_categ]['id_mere']]['fulllabel']; - $this->cats[$id_categ]['fulllabel'].=' >> '.$this->cats[$id_categ]['label']; - } - else - { - $this->cats[$id_categ]['fullpath']='_'.$id_categ; - $this->cats[$id_categ]['fulllabel']=$this->cats[$id_categ]['label']; - } - // We count number of _ to have level - $this->cats[$id_categ]['level']=strlen(preg_replace('/([^_])/i','',$this->cats[$id_categ]['fullpath'])); - - // Traite ces enfants - $protection++; - if ($protection > 20) return; // On ne traite pas plus de 20 niveaux - if (is_array($this->cats[$id_categ]['id_children'])) - { - foreach($this->cats[$id_categ]['id_children'] as $key => $val) - { - $this->build_path_from_id_categ($val,$protection); - } - } - - return 1; - } - - /** - * \brief Refresh value for cachenboffile - * \param directory Directory to scan - * \param all 0=refresh this id , 1=refresh this entity - * \return int <0 if KO, Nb of files in directory if OK - */ - function refreshcachenboffile($all=0) - { - global $conf; - include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php'); - - $dir=$conf->ecm->dir_output.'/'.$this->getRelativePath(); - $filelist=dol_dir_list($dir,'files',0,'','\.meta$'); - - // Test if filelist is in database - - - // Update request - $sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories SET"; - $sql.= " cachenbofdoc = '".sizeof($filelist)."'"; - if (empty($all)) - { - $sql.= " WHERE rowid = ".$this->id; - } - else - { - $sql.= " WHERE entity = ".$conf->entity; - } - - dol_syslog("EcmDirectories::refreshcachenboffile sql=".$sql, LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $this->cachenbofdoc=sizeof($filelist); - return $this->cachenbofdoc; - } - else - { - $this->error="Error ".$this->db->lasterror(); - dol_syslog("EcmDirectories::refreshcachenboffile ".$this->error, LOG_ERR); - return -1; - } - } - -} -?> + + * Copyright (C) 2008-2009 Regis Houssin + * + * 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/ecm/ecm_directories.class.php + * \ingroup ecm + * \brief This file is an example for a class file + * \version $Id$ + * \author Laurent Destailleur + * \remarks Initialy built by build_class_from_table on 2008-02-24 19:24 + */ + +/** + * \class EcmDirectory + * \brief Class to manage ECM directories + * \remarks Initialy built by build_class_from_table on 2008-02-24 19:24 + */ +class EcmDirectory // extends CommonObject +{ + var $db; //!< To store db handler + var $error; //!< To return error code (or message) + var $errors=array(); //!< To return several error codes (or messages) + //var $element='ecm_directories'; //!< Id that identify managed objects + //var $table_element='ecm_directories'; //!< Name of table without prefix where object is stored + + var $id; + + var $label; + var $fk_parent; + var $description; + var $cachenbofdoc; + var $date_c; + var $date_m; + + var $cats=array(); + var $motherof=array(); + + + /** + * \brief Constructor + * \param DB Database handler + */ + function EcmDirectory($DB) + { + $this->db = $DB; + return 1; + } + + + /** + * \brief Create in database + * \param user User that create + * \return int <0 si ko, >0 si ok + */ + function create($user) + { + global $conf, $langs; + + $now=time(); + + // Clean parameters + $this->label=dol_string_nospecial(trim($this->label)); + $this->fk_parent=trim($this->fk_parent); + $this->description=trim($this->description); + if (! $this->cachenbofdoc) $this->cachenbofdoc=0; + $this->date_c=$now; + $this->fk_user_c=$user->id; + if ($this->fk_parent <= 0) $this->fk_parent=0; + + // Check if same directory does not exists with this name + $relativepath=$this->label; + if ($this->fk_parent) + { + $parent = new ECMDirectory($this->db); + $parent->fetch($this->fk_parent); + $relativepath=$parent->getRelativePath().$relativepath; + } + $relativepath=preg_replace('/([\/])+/i','/',$relativepath); // Avoid duplicate / or \ + //print $relativepath.'
'; + + $cat = new ECMDirectory($this->db); + $cate_arbo = $cat->get_full_arbo(1); + $pathfound=0; + foreach ($cate_arbo as $key => $categ) + { + $path=preg_replace('/([\s-><\/])+/i','/',$categ['fulllabel']); + //print $path.'
'; + if ($path == $relativepath) + { + $pathfound=1; + break; + } + } + + if ($pathfound) + { + $this->error="ErrorDirAlreadyExists"; + dol_syslog("EcmDirectories::create ".$this->error, LOG_WARNING); + return -1; + } + else + { + $this->db->begin(); + + // Insert request + $sql = "INSERT INTO ".MAIN_DB_PREFIX."ecm_directories("; + $sql.= "label,"; + $sql.= "entity,"; + $sql.= "fk_parent,"; + $sql.= "description,"; + $sql.= "cachenbofdoc,"; + $sql.= "date_c,"; + $sql.= "fk_user_c"; + $sql.= ") VALUES ("; + $sql.= " '".addslashes($this->label)."',"; + $sql.= " '".$conf->entity."',"; + $sql.= " '".$this->fk_parent."',"; + $sql.= " '".addslashes($this->description)."',"; + $sql.= " ".($this->cachenbofdoc).","; + $sql.= " ".$this->db->idate($this->date_c).","; + $sql.= " '".$this->fk_user_c."'"; + $sql.= ")"; + + dol_syslog("EcmDirectories::create sql=".$sql, LOG_DEBUG); + $resql=$this->db->query($sql); + if ($resql) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."ecm_directories"); + + $dir=$conf->ecm->dir_output.'/'.$this->getRelativePath(); + $result=create_exdir($dir); + + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('MYECMDIR_CREATE',$this,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Fin appel triggers + + if (! $error) + { + $this->db->commit(); + return $this->id; + } + else + { + $this->db->rollback(); + return -1; + } + } + else + { + $this->error="Error ".$this->db->lasterror(); + dol_syslog("EcmDirectories::create ".$this->error, LOG_ERR); + $this->db->rollback(); + return -1; + } + } + } + + /** + * \brief Update database + * \param user User that modify + * \param notrigger 0=no, 1=yes (no update trigger) + * \return int <0 if KO, >0 if OK + */ + function update($user=0, $notrigger=0) + { + global $conf, $langs; + + $error=0; + + // Clean parameters + $this->label=trim($this->label); + $this->fk_parent=trim($this->fk_parent); + $this->description=trim($this->description); + + // Check parameters + // Put here code to add control on parameters values + + $this->db->begin(); + + // Update request + $sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories SET"; + $sql.= " label='".addslashes($this->label)."',"; + $sql.= " fk_parent='".$this->fk_parent."',"; + $sql.= " description='".addslashes($this->description)."'"; + $sql.= " WHERE rowid=".$this->id; + + dol_syslog("EcmDirectories::update sql=".$sql, LOG_DEBUG); + $resql = $this->db->query($sql); + if (! $resql) + { + $error++; + $this->error="Error ".$this->db->lasterror(); + dol_syslog("EcmDirectories::update ".$this->error, LOG_ERR); + } + + if (! $error && ! $notrigger) + { + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('MYECMDIR_MODIFY',$this,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Fin appel triggers + } + + if (! $error) + { + $this->db->commit(); + return 1; + } + else + { + $this->db->rollback(); + return -1; + } + } + + + /** + * \brief Update database + * \sign '+' or '-' + * \return int <0 if KO, >0 if OK + */ + function changeNbOfFiles($sign) + { + global $conf, $langs; + + // Update request + $sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories SET"; + $sql.= " cachenbofdoc = cachenbofdoc ".$sign." 1"; + $sql.= " WHERE rowid = ".$this->id; + + dol_syslog("EcmDirectories::changeNbOfFiles sql=".$sql, LOG_DEBUG); + $resql = $this->db->query($sql); + if (! $resql) + { + $this->error="Error ".$this->db->lasterror(); + dol_syslog("EcmDirectories::changeNbOfFiles ".$this->error, LOG_ERR); + return -1; + } + + return 1; + } + + + /** + * \brief Load object in memory from database + * \param id id object + * \return int <0 if KO, 0 if not found, >0 if OK + */ + function fetch($id) + { + $sql = "SELECT"; + $sql.= " t.rowid,"; + $sql.= " t.label,"; + $sql.= " t.fk_parent,"; + $sql.= " t.description,"; + $sql.= " t.cachenbofdoc,"; + $sql.= " t.fk_user_c,"; + $sql.= " t.fk_user_m,"; + $sql.= " ".$this->db->pdate('t.date_c')." as date_c,"; + $sql.= " ".$this->db->pdate('t.date_m')." as date_m"; + $sql.= " FROM ".MAIN_DB_PREFIX."ecm_directories as t"; + $sql.= " WHERE t.rowid = ".$id; + + dol_syslog("EcmDirectories::fetch sql=".$sql, LOG_DEBUG); + $resql=$this->db->query($sql); + if ($resql) + { + $obj = $this->db->fetch_object($resql); + if ($obj) + { + $this->id = $obj->rowid; + $this->ref = $obj->rowid; + + $this->label = $obj->label; + $this->fk_parent = $obj->fk_parent; + $this->description = $obj->description; + $this->cachenbofdoc = $obj->cachenbofdoc; + $this->fk_user_m = $obj->fk_user_m; + $this->fk_user_c = $obj->fk_user_c; + $this->date_c = $obj->date_c; + $this->date_m = $obj->date_m; + } + + $this->db->free($resql); + + return $obj?1:0; + } + else + { + $this->error="Error ".$this->db->lasterror(); + dol_syslog("EcmDirectories::fetch ".$this->error, LOG_ERR); + return -1; + } + } + + + /** + * \brief Delete object on database and on disk + * \param user User that delete + * \return int <0 if KO, >0 if OK + */ + function delete($user) + { + global $conf, $langs; + + $relativepath=$this->getRelativePath(1); // Ex: dir1/dir2/dir3 + + dol_syslog("EcmDirectories::delete remove directory ".$relativepath); + + $this->db->begin(); + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."ecm_directories"; + $sql.= " WHERE rowid=".$this->id; + + dol_syslog("EcmDirectories::delete sql=".$sql); + $resql = $this->db->query($sql); + if (! $resql) + { + $this->db->rollback(); + $this->error="Error ".$this->db->lasterror(); + dol_syslog("EcmDirectories::delete ".$this->error, LOG_ERR); + return -2; + } + + $file = $conf->ecm->dir_output . "/" . $relativepath; + $result=@dol_delete_dir($file); + + if ($result || ! @is_dir(dol_osencode($file))) + { + $this->db->commit(); + } + else + { + $this->error='ErrorFailedToDeleteDir'; + dol_syslog("EcmDirectories::delete ".$this->error, LOG_ERR); + $this->db->rollback(); + $error++; + } + + if (! $error) + { + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('MYECMDIR_DELETE',$this,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Fin appel triggers + } + + if (! $error) return 1; + else return -1; + } + + + /** + * \brief Initialise object with example values + * \remarks id must be 0 if object instance is a specimen. + */ + function initAsSpecimen() + { + $this->id=0; + + $this->label='MyDirectory'; + $this->fk_parent='0'; + $this->description='This is a directory'; + } + + + /** + * \brief Return directory name you can click (and picto) + * \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul + * \param option Sur quoi pointe le lien + * \return string Chaine avec URL + */ + function getNomUrl($withpicto=0,$option='',$max=0) + { + global $langs; + + $result=''; + + $lien = ''; + if ($option == 'index') $lien = ''; + if ($option == 'indexexpanded') $lien = ''; + if ($option == 'indexnotexpanded') $lien = ''; + $lienfin=''; + + //$picto=DOL_URL_ROOT.'/theme/common/treemenu/folder.gif'; + $picto='dir'; + + $newref=str_replace('_',' ',$this->ref); + $newlabel=$langs->trans("ShowECMSection").': '.$newref; + + if ($withpicto) $result.=($lien.img_object($newlabel,$picto,'',1).$lienfin); + if ($withpicto && $withpicto != 2) $result.=' '; + if ($withpicto != 2) $result.=$lien.($max?dol_trunc($newref,$max,'middle'):$newref).$lienfin; + return $result; + } + + /** + * \brief Return relative path of a directory on disk + * \param force Force reload of full arbo even if already loaded + * \return string Relative physical path + */ + function getRelativePath($force=0) + { + $this->get_full_arbo($force); + + $ret=''; + $idtosearch=$this->id; + $i=0; + do { + // Get index cursor in this->cats for id_mere + $cursorindex=-1; + foreach ($this->cats as $key => $val) + { + if ($this->cats[$key]['id'] == $idtosearch) + { + $cursorindex=$key; + break; + } + } + //print "c=".$idtosearch."-".$cursorindex; + + if ($cursorindex >= 0) + { + // Path is label sanitized (no space and no special char) and concatenated + $ret=dol_sanitizeFileName($this->cats[$cursorindex]['label']).'/'.$ret; + + $idtosearch=$this->cats[$cursorindex]['id_mere']; + $i++; + } + } + while ($cursorindex >= 0 && ! empty($idtosearch) && $i < 100); // i avoid infinite loop + + return $ret; + } + + /** + * \brief Load this->motherof that is array(id_son=>id_parent, ...) + * \return int <0 if KO, >0 if OK + */ + function load_motherof() + { + global $conf; + + $this->motherof=array(); + + // Charge tableau des meres + $sql = "SELECT fk_parent as id_parent, rowid as id_son"; + $sql.= " FROM ".MAIN_DB_PREFIX."ecm_directories"; + $sql.= " WHERE fk_parent != 0"; + $sql.= " AND entity = ".$conf->entity; + + dol_syslog("EcmDirectory::get_full_arbo sql=".$sql); + $resql = $this->db->query($sql); + if ($resql) + { + while ($obj= $this->db->fetch_object($resql)) + { + $this->motherof[$obj->id_son]=$obj->id_parent; + } + return 1; + } + else + { + dol_print_error ($this->db); + return -1; + } + } + + + /** + * \brief Reconstruit l'arborescence des categories sous la forme d'un tableau + * Renvoi un tableau de tableau('id','id_mere',...) trie selon + * arbre et avec: + * id = id de la categorie + * id_mere = id de la categorie mere + * id_children = tableau des id enfant + * label = nom de la categorie + * cachenbofdoc = nb of documents + * date_c = date creation + * fk_user_c = user creation + * login_c = login creation + * fullpath Full path (Added by build_path_from_id_categ call) + * fulllabel Full label (Added by build_path_from_id_categ call) + * level Level of line (Added by build_path_from_id_categ call) + * \param force Force reload of full arbo even if already loaded + * \return array Tableau de array + */ + function get_full_arbo($force=0) + { + global $conf; + + if (empty($force) && $this->full_arbo_loaded) + { + return $this->cats; + } + + // Init this->motherof that is array(id_son=>id_parent, ...) + $this->load_motherof(); + + // Charge tableau des categories + $sql = "SELECT c.rowid as rowid, c.label as label,"; + $sql.= " c.description as description, c.cachenbofdoc,"; + $sql.= " c.fk_user_c,"; + $sql.= " c.date_c,"; + $sql.= " u.login as login_c,"; + $sql.= " ca.rowid as rowid_fille"; + $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; + $sql.= ", ".MAIN_DB_PREFIX."ecm_directories as c"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."ecm_directories as ca"; + $sql.= " ON c.rowid = ca.fk_parent"; + $sql.= " WHERE c.fk_user_c = u.rowid"; + $sql.= " AND c.entity = ".$conf->entity; + $sql.= " ORDER BY c.label, c.rowid"; + + dol_syslog("EcmDirectory::get_full_arbo sql=".$sql); + $resql = $this->db->query ($sql); + if ($resql) + { + $this->cats = array(); + $i=0; + while ($obj = $this->db->fetch_object($resql)) + { + $this->cats[$obj->rowid]['id'] = $obj->rowid; + $this->cats[$obj->rowid]['id_mere'] = $this->motherof[$obj->rowid]; + $this->cats[$obj->rowid]['label'] = $obj->label; + $this->cats[$obj->rowid]['description'] = $obj->description; + $this->cats[$obj->rowid]['cachenbofdoc'] = $obj->cachenbofdoc; + $this->cats[$obj->rowid]['date_c'] = $obj->date_c; + $this->cats[$obj->rowid]['fk_user_c'] = $obj->fk_user_c; + $this->cats[$obj->rowid]['login_c'] = $obj->login_c; + + if ($obj->rowid_fille) + { + if (is_array($this->cats[$obj->rowid]['id_children'])) + { + $newelempos=sizeof($this->cats[$obj->rowid]['id_children']); + //print "this->cats[$i]['id_children'] est deja un tableau de $newelem elements
"; + $this->cats[$obj->rowid]['id_children'][$newelempos]=$obj->rowid_fille; + } + else + { + //print "this->cats[".$obj->rowid."]['id_children'] n'est pas encore un tableau
"; + $this->cats[$obj->rowid]['id_children']=array($obj->rowid_fille); + } + } + $i++; + + } + } + else + { + dol_print_error ($this->db); + return -1; + } + + // On ajoute la propriete fullpath a tous les elements + foreach($this->cats as $key => $val) + { + if (isset($motherof[$key])) continue; + $this->build_path_from_id_categ($key,0); + } + + $this->cats=dol_sort_array($this->cats, 'fulllabel', 'asc', true, false); + $this->full_arbo_loaded=1; + + return $this->cats; + } + + /** + * \brief Calcule les proprietes fullpath et fulllabel d'une categorie + * du tableau this->cats et de toutes ces enfants + * \param id_categ id_categ entry to update + * \param protection Deep counter to avoid infinite loop + */ + function build_path_from_id_categ($id_categ,$protection=0) + { + // Define fullpath + if (isset($this->cats[$id_categ]['id_mere'])) + { + $this->cats[$id_categ]['fullpath'] =$this->cats[$this->cats[$id_categ]['id_mere']]['fullpath']; + $this->cats[$id_categ]['fullpath'].='_'.$id_categ; + $this->cats[$id_categ]['fulllabel'] =$this->cats[$this->cats[$id_categ]['id_mere']]['fulllabel']; + $this->cats[$id_categ]['fulllabel'].=' >> '.$this->cats[$id_categ]['label']; + } + else + { + $this->cats[$id_categ]['fullpath']='_'.$id_categ; + $this->cats[$id_categ]['fulllabel']=$this->cats[$id_categ]['label']; + } + // We count number of _ to have level + $this->cats[$id_categ]['level']=strlen(preg_replace('/([^_])/i','',$this->cats[$id_categ]['fullpath'])); + + // Traite ces enfants + $protection++; + if ($protection > 20) return; // On ne traite pas plus de 20 niveaux + if (is_array($this->cats[$id_categ]['id_children'])) + { + foreach($this->cats[$id_categ]['id_children'] as $key => $val) + { + $this->build_path_from_id_categ($val,$protection); + } + } + + return 1; + } + + /** + * \brief Refresh value for cachenboffile + * \param directory Directory to scan + * \param all 0=refresh this id , 1=refresh this entity + * \return int <0 if KO, Nb of files in directory if OK + */ + function refreshcachenboffile($all=0) + { + global $conf; + include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php'); + + $dir=$conf->ecm->dir_output.'/'.$this->getRelativePath(); + $filelist=dol_dir_list($dir,'files',0,'','\.meta$'); + + // Test if filelist is in database + + + // Update request + $sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories SET"; + $sql.= " cachenbofdoc = '".sizeof($filelist)."'"; + if (empty($all)) + { + $sql.= " WHERE rowid = ".$this->id; + } + else + { + $sql.= " WHERE entity = ".$conf->entity; + } + + dol_syslog("EcmDirectories::refreshcachenboffile sql=".$sql, LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $this->cachenbofdoc=sizeof($filelist); + return $this->cachenbofdoc; + } + else + { + $this->error="Error ".$this->db->lasterror(); + dol_syslog("EcmDirectories::refreshcachenboffile ".$this->error, LOG_ERR); + return -1; + } + } + +} +?> diff --git a/htdocs/expedition/expedition.class.php b/htdocs/expedition/expedition.class.php index 53838fb3f50..787b2cdd3b5 100644 --- a/htdocs/expedition/expedition.class.php +++ b/htdocs/expedition/expedition.class.php @@ -447,7 +447,7 @@ class Expedition extends CommonObject if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('ORDER_SHIPPING',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/exports/export.class.php b/htdocs/exports/export.class.php index 4fe68b4c229..f3a70a53f68 100644 --- a/htdocs/exports/export.class.php +++ b/htdocs/exports/export.class.php @@ -401,7 +401,7 @@ class Export // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); //$interface=new Interfaces($this->db); //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/fichinter/fichinter.class.php b/htdocs/fichinter/fichinter.class.php index a54de98617e..0baaf7b4f22 100644 --- a/htdocs/fichinter/fichinter.class.php +++ b/htdocs/fichinter/fichinter.class.php @@ -287,7 +287,7 @@ class Fichinter extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('FICHEINTER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/fourn/facture/paiementfourn.class.php b/htdocs/fourn/facture/paiementfourn.class.php index 77dd62841b6..fa336cfbce9 100644 --- a/htdocs/fourn/facture/paiementfourn.class.php +++ b/htdocs/fourn/facture/paiementfourn.class.php @@ -175,7 +175,7 @@ class PaiementFourn if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PAYMENT_SUPPLIER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/fourn/fournisseur.commande.class.php b/htdocs/fourn/fournisseur.commande.class.php index 0e66fdf8beb..b738ae9b9b1 100644 --- a/htdocs/fourn/fournisseur.commande.class.php +++ b/htdocs/fourn/fournisseur.commande.class.php @@ -302,7 +302,7 @@ class CommandeFournisseur extends Commande if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('ORDER_SUPPLIER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -356,7 +356,7 @@ class CommandeFournisseur extends Commande $this->log($user, $statut, time()); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('ORDER_SUPPLIER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -584,7 +584,7 @@ class CommandeFournisseur extends Commande if ($error == 0) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('ORDER_SUPPLIER_APPROVE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -642,7 +642,7 @@ class CommandeFournisseur extends Commande if ($error == 0) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('ORDER_SUPPLIER_REFUSE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -744,7 +744,7 @@ class CommandeFournisseur extends Commande $this->log($user, 0, time()); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('ORDER_SUPPLIER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1056,7 +1056,7 @@ class CommandeFournisseur extends Commande if ($err == 0) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('ORDER_SUPPLIER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/fourn/fournisseur.facture.class.php b/htdocs/fourn/fournisseur.facture.class.php index 70cc406cc5b..1e1e6e66702 100644 --- a/htdocs/fourn/fournisseur.facture.class.php +++ b/htdocs/fourn/fournisseur.facture.class.php @@ -464,7 +464,7 @@ class FactureFournisseur extends Facture $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('BILL_SUPPLIER_PAYED',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -516,7 +516,7 @@ class FactureFournisseur extends Facture $this->use_webcal=($conf->global->PHPWEBCALENDAR_BILLSTATUS=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('BILL_SUPPLIER_UNPAYED',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -590,7 +590,7 @@ class FactureFournisseur extends Facture if ($error == 0) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('BILL_SUPPLIER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/imports/import.class.php b/htdocs/imports/import.class.php index f120be0bcb4..90b1e8f37e5 100644 --- a/htdocs/imports/import.class.php +++ b/htdocs/imports/import.class.php @@ -313,7 +313,7 @@ class Import // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + //include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); //$interface=new Interfaces($this->db); //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); //if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 7dd34a9cffd..a0a596dc3de 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -328,7 +328,7 @@ if (! defined('NOLOGIN')) $test=false; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($db); $result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,$_POST["entity"]); if ($result < 0) { $error++; } @@ -386,7 +386,7 @@ if (! defined('NOLOGIN')) $_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadLoginPassword"); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($db); $result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,$_POST["entity"]); if ($result < 0) { $error++; } @@ -426,7 +426,7 @@ if (! defined('NOLOGIN')) } // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($db); $result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,$_POST["entity"]); if ($result < 0) { $error++; } @@ -467,7 +467,7 @@ if (! defined('NOLOGIN')) } // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($db); $result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,(isset($_POST["entity"])?$_POST["entity"]:0)); if ($result < 0) { $error++; } @@ -495,7 +495,7 @@ if (! defined('NOLOGIN')) $user->update_last_login_date(); // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($db); $result=$interface->run_triggers('USER_LOGIN',$user,$user,$langs,$conf,$_POST["entity"]); if ($result < 0) { $error++; } diff --git a/htdocs/oscommerce_ws/produits/osc_categories.class.php b/htdocs/oscommerce_ws/produits/osc_categories.class.php index 4942cc3662a..095791b73ca 100644 --- a/htdocs/oscommerce_ws/produits/osc_categories.class.php +++ b/htdocs/oscommerce_ws/produits/osc_categories.class.php @@ -94,7 +94,7 @@ class Osc_Categorie } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -144,7 +144,7 @@ class Osc_Categorie if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -289,7 +289,7 @@ class Osc_Categorie } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/paiement.class.php b/htdocs/paiement.class.php index 20ced109760..c7e3c8cc4d8 100644 --- a/htdocs/paiement.class.php +++ b/htdocs/paiement.class.php @@ -180,7 +180,7 @@ class Paiement if (! $error) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PAYMENT_CUSTOMER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/product/product.class.php b/htdocs/product/product.class.php index ef3f3860951..5ac6c019299 100644 --- a/htdocs/product/product.class.php +++ b/htdocs/product/product.class.php @@ -557,7 +557,7 @@ class Product extends CommonObject } // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PRODUCT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/projet/project.class.php b/htdocs/projet/project.class.php index 9f04e80005e..b7d1837066e 100644 --- a/htdocs/projet/project.class.php +++ b/htdocs/projet/project.class.php @@ -118,7 +118,7 @@ class Project extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PROJECT_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -168,7 +168,7 @@ class Project extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PROJECT_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -393,7 +393,7 @@ class Project extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PROJECT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -436,7 +436,7 @@ class Project extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PROJECT_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -489,7 +489,7 @@ class Project extends CommonObject if ($resql) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('PROJECT_CLOSE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/projet/tasks/task.class.php b/htdocs/projet/tasks/task.class.php index 493638fc8ae..9bf1e6d2707 100644 --- a/htdocs/projet/tasks/task.class.php +++ b/htdocs/projet/tasks/task.class.php @@ -131,7 +131,7 @@ class Task extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('TASK_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -270,7 +270,7 @@ class Task extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('TASK_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -331,7 +331,7 @@ class Task extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('TASK_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -625,7 +625,7 @@ class Task extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('TASK_TIMESPENT_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -729,7 +729,7 @@ class Task extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('TASK_TIMESPENT_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -790,7 +790,7 @@ class Task extends CommonObject if (! $notrigger) { // Call triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('TASK_TIMESPENT_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/societe/societe.class.php b/htdocs/societe/societe.class.php index e9a95aa4bf1..2c0415d57c2 100644 --- a/htdocs/societe/societe.class.php +++ b/htdocs/societe/societe.class.php @@ -213,7 +213,7 @@ class Societe extends CommonObject $this->use_webcal=($conf->global->PHPWEBCALENDAR_COMPANYCREATE=='always'?1:0); // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('COMPANY_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -489,7 +489,7 @@ class Societe extends CommonObject if ($call_trigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('COMPANY_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -889,7 +889,7 @@ class Societe extends CommonObject if ($sqr == 4) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('COMPANY_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/user/group/usergroup.class.php b/htdocs/user/group/usergroup.class.php index 9e1b9ed0959..4d4f9b5427b 100644 --- a/htdocs/user/group/usergroup.class.php +++ b/htdocs/user/group/usergroup.class.php @@ -464,7 +464,7 @@ class UserGroup extends CommonObject if ($result) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('USER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -501,7 +501,7 @@ class UserGroup extends CommonObject if ($this->update(1) < 0) return -2; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('GROUP_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -540,7 +540,7 @@ class UserGroup extends CommonObject if (!$error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('GROUP_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/user/user.class.php b/htdocs/user/user.class.php index 860ba3eeb60..654afce40aa 100644 --- a/htdocs/user/user.class.php +++ b/htdocs/user/user.class.php @@ -614,7 +614,7 @@ class User extends CommonObject if ($result) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('USER_ENABLEDISABLE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -670,7 +670,7 @@ class User extends CommonObject if ($result) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('USER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -771,7 +771,7 @@ class User extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface = new Interfaces($this->db); $result = $interface->run_triggers('USER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1109,7 +1109,7 @@ class User extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('USER_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -1254,7 +1254,7 @@ class User extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + include_once(DOL_DOCUMENT_ROOT . "/core/interfaces.class.php"); $interface=new Interfaces($this->db); $result=$interface->run_triggers('USER_NEW_PASSWORD',$this,$user,$langs,$conf); if ($result < 0) $this->errors=$interface->errors;