diff --git a/dev/initdata/generate-commande.php b/dev/initdata/generate-commande.php index 9d13914ef33..a2f0078a71c 100644 --- a/dev/initdata/generate-commande.php +++ b/dev/initdata/generate-commande.php @@ -34,12 +34,12 @@ if (substr($sapi_type, 0, 3) == 'cgi') { // Recupere root dolibarr $path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]); require ($path."../../htdocs/master.inc.php"); -include_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); -include_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php"); -include_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); -include_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php"); -include_once(DOL_DOCUMENT_ROOT."/compta/paiement/class/paiement.class.php"); -include_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"); +include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; +include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; /* diff --git a/dev/initdata/generate-produit.php b/dev/initdata/generate-produit.php index 5a35a3b116a..ba19e621b4f 100644 --- a/dev/initdata/generate-produit.php +++ b/dev/initdata/generate-produit.php @@ -34,12 +34,12 @@ if (substr($sapi_type, 0, 3) == 'cgi') { // Recupere root dolibarr $path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]); require ($path."../../htdocs/master.inc.php"); -include_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); -include_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php"); -include_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); -include_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php"); -include_once(DOL_DOCUMENT_ROOT."/compta/paiement/class/paiement.class.php"); -include_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"); +include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; +include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; /* diff --git a/dev/initdata/generate-societe.php b/dev/initdata/generate-societe.php index 3f265f2a181..4c0c04df0ab 100644 --- a/dev/initdata/generate-societe.php +++ b/dev/initdata/generate-societe.php @@ -34,12 +34,12 @@ if (substr($sapi_type, 0, 3) == 'cgi') { // Recupere root dolibarr $path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]); require ($path."../../htdocs/master.inc.php"); -include_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); -include_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php"); -include_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); -include_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php"); -include_once(DOL_DOCUMENT_ROOT."/compta/paiement/class/paiement.class.php"); -include_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"); +include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; +include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $villes = array("Auray","Baden","Vannes","Pirouville","Haguenau","Souffelweiersheim","Illkirch-Graffenstaden","Lauterbourg","Picauville","Sainte-Mère Eglise","Le Bono"); $prenoms = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Dorothee","Saby","Brigitte","Karine","Jose-Anne","Celine","Virginie"); diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index 71401511e7a..416b65150cb 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -25,7 +25,7 @@ * \ingroup mymodule * \brief Description and activation file for module MyModule */ -include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php"); +include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; /** diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index f5de8e82f8c..3c8db50ee29 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -105,7 +105,7 @@ class Skeleton_Class // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + //include_once DOL_DOCUMENT_ROOT . '/core/class/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; } @@ -216,7 +216,7 @@ class Skeleton_Class // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + //include_once DOL_DOCUMENT_ROOT . '/core/class/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; } @@ -265,7 +265,7 @@ class Skeleton_Class // extends CommonObject // want this action call a trigger. //// Call triggers - //include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + //include_once DOL_DOCUMENT_ROOT . '/core/class/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/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index 82d6f74497c..13878312fce 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -36,15 +36,15 @@ // Change this following line to use the correct relative path (../, ../../, etc) $res=0; -if (! $res && file_exists("../main.inc.php")) $res=@include("../main.inc.php"); -if (! $res && file_exists("../../main.inc.php")) $res=@include("../../main.inc.php"); -if (! $res && file_exists("../../../main.inc.php")) $res=@include("../../../main.inc.php"); -if (! $res && file_exists("../../../dolibarr/htdocs/main.inc.php")) $res=@include("../../../dolibarr/htdocs/main.inc.php"); // Used on dev env only -if (! $res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) $res=@include("../../../../dolibarr/htdocs/main.inc.php"); // Used on dev env only -if (! $res && file_exists("../../../../../dolibarr/htdocs/main.inc.php")) $res=@include("../../../../../dolibarr/htdocs/main.inc.php"); // Used on dev env only +if (! $res && file_exists("../main.inc.php")) $res=@include '../main.inc.php'; +if (! $res && file_exists("../../main.inc.php")) $res=@include '../../main.inc.php'; +if (! $res && file_exists("../../../main.inc.php")) $res=@include '../../../main.inc.php'; +if (! $res && file_exists("../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only +if (! $res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only +if (! $res && file_exists("../../../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only if (! $res) die("Include of main fails"); // Change this following line to use the correct relative path from htdocs -dol_include_once("/module/class/skeleton_class.class.php"); +dol_include_once('/module/class/skeleton_class.class.php'); // Load traductions files requiredby by page $langs->load("companies"); diff --git a/htdocs/adherents/admin/mailman.php b/htdocs/adherents/admin/mailman.php index ce407584391..5e7aa08f547 100644 --- a/htdocs/adherents/admin/mailman.php +++ b/htdocs/adherents/admin/mailman.php @@ -99,7 +99,7 @@ if (($action == 'testsubscribe' || $action == 'testunsubscribe') && ! empty($con } else { - include_once(DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'); + include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; $mailmanspip=new MailmanSpip($db); $object=new stdClass(); diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 99bf68174ae..ece8bcf5cd7 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -722,7 +722,7 @@ if ($rowid) // Link for paypal payment if ($conf->paypal->enabled) { - include_once(DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'); + include_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; print showPaypalPaymentUrl('membersubscription',$object->ref); } diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 7e7f73971a7..3c0290b4eeb 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -162,7 +162,7 @@ class Adherent extends CommonObject $from=$conf->email_from; if ($conf->global->ADHERENT_MAIL_FROM) $from=$conf->global->ADHERENT_MAIL_FROM; - include_once(DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php"); + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $mailfile = new CMailFile($subjecttosend, $this->email, $from, $texttosend, $filename_list, $mimetype_list, $mimefilename_list, $addr_cc, $addr_bcc, $deliveryreceipt, $msgishtml); if ($mailfile->sendfile()) { @@ -345,7 +345,7 @@ class Adherent extends CommonObject if (! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + include_once DOL_DOCUMENT_ROOT . '/core/class/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; } @@ -462,7 +462,7 @@ class Adherent extends CommonObject $nbrowsaffected+=$this->db->affected_rows($resql); // Actions on extra fields (by external module) - include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); + include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager=new HookManager($this->db); $hookmanager->initHooks(array('memberdao')); $parameters=array('id'=>$this->id); @@ -596,7 +596,7 @@ class Adherent extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + include_once DOL_DOCUMENT_ROOT . '/core/class/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; } @@ -729,7 +729,7 @@ class Adherent extends CommonObject if ($this->db->affected_rows($resql)) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); $result=$interface->run_triggers('MEMBER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { @@ -852,7 +852,7 @@ class Adherent extends CommonObject if (! $error && ! $notrigger) { // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + include_once DOL_DOCUMENT_ROOT . '/core/class/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; } @@ -1227,7 +1227,7 @@ class Adherent extends CommonObject $this->last_subscription_date_end=$datefin; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + include_once DOL_DOCUMENT_ROOT . '/core/class/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; } @@ -1288,7 +1288,7 @@ class Adherent extends CommonObject $this->statut=1; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + include_once DOL_DOCUMENT_ROOT . '/core/class/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; } @@ -1338,7 +1338,7 @@ class Adherent extends CommonObject $this->statut=0; // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + include_once DOL_DOCUMENT_ROOT . '/core/class/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; } @@ -1366,7 +1366,7 @@ class Adherent extends CommonObject { global $conf; - include_once(DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'); + include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; $mailmanspip=new MailmanSpip($db); $err=0; @@ -1412,7 +1412,7 @@ class Adherent extends CommonObject { global $conf; - include_once(DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'); + include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; $mailmanspip=new MailmanSpip($db); $err=0; diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php index 4db3884cdad..52d73691cb8 100755 --- a/htdocs/adherents/class/adherentstats.class.php +++ b/htdocs/adherents/class/adherentstats.class.php @@ -23,8 +23,8 @@ * \brief Fichier de la classe de gestion des stats des adhérents */ -include_once DOL_DOCUMENT_ROOT . "/core/class/stats.class.php"; -include_once DOL_DOCUMENT_ROOT . "/adherents/class/cotisation.class.php"; +include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php'; +include_once DOL_DOCUMENT_ROOT . '/adherents/class/cotisation.class.php'; /** diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 4abaa9b822e..75a9c9a60cf 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -85,7 +85,7 @@ if ($rowid) } // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array -include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); +include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager=new HookManager($db); $hookmanager->initHooks(array('membercard')); @@ -1128,7 +1128,7 @@ if ($rowid && $action != 'edit') if (empty($login)) { // Full firstname and name separated with a dot : firstname.name - include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'); + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $login=dol_buildlogin($object->lastname,$object->firstname); } if (empty($login)) $login=strtolower(substr($object->firstname, 0, 4)) . strtolower(substr($object->lastname, 0, 4)); @@ -1564,7 +1564,7 @@ if ($rowid && $action != 'edit') // Action SPIP if ($conf->mailmanspip->enabled && $conf->global->ADHERENT_USE_SPIP) { - include_once(DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'); + include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; $mailmanspip=new MailmanSpip($db); $isinspip=$mailmanspip->is_in_spip($object); diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index fc45ac75dd6..b97133c4606 100755 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -198,7 +198,7 @@ else if ($mode == 'memberbycountry') { $color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/graph-color.php'; - if (is_readable($color_file)) include_once($color_file); + if (is_readable($color_file)) include_once $color_file; // Assume we've already included the proper headers so just call our script inline // More doc: https://developers.google.com/chart/interactive/docs/gallery/geomap?hl=fr-FR diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index c9de48afb95..b1112017b80 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -207,7 +207,7 @@ if ($resql) // Check if directory exists (we do not use dol_is_dir to avoid loading files.lib.php) if (! is_dir($newdir)) continue; - $result=@include_once($newdir.$obj->coder.".modules.php"); + $result=@include_once $newdir.$obj->coder.'.modules.php'; if ($result) break; } if ($result) diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index d454fe4b95a..e1ca04bb00e 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -23,9 +23,9 @@ */ require '../main.inc.php'; -include_once(DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php"); +include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; -include_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); +include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $langs->load("admin"); diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index b6bca0eefeb..80f6d04921a 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -62,7 +62,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array -include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); +include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager=new HookManager($db); $hookmanager->initHooks(array('admin')); diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 98b91883366..e3e822577ee 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -117,7 +117,7 @@ if (! empty($_POST['removedfile']) || ! empty($_POST['removedfilehtml'])) { setEventMessage($langs->trans("FileWasRemoved"), $filetodelete); - include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'); + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); $formmail->remove_attached_files($keytodelete); } @@ -154,7 +154,7 @@ if (($action == 'send' || $action == 'sendhtml') && ! GETPOST('addfile') && ! GE $deliveryreceipt= $_POST["deliveryreceipt"]; // Create form object - include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'); + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); $attachedfiles=$formmail->get_attached_files(); @@ -644,7 +644,7 @@ else // If we use SSL/TLS if (! empty($conf->global->MAIN_MAIL_EMAIL_TLS) && function_exists('openssl_open')) $server='ssl://'.$server; - include_once(DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php"); + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $mail = new CMailFile('','','',''); $result=$mail->check_server_port($server,$port); if ($result) print '