diff --git a/htdocs/includes/pear/Auth/Auth.php b/htdocs/includes/pear/Auth/Auth.php index beb1e5a4ea3..872e2ecf679 100644 --- a/htdocs/includes/pear/Auth/Auth.php +++ b/htdocs/includes/pear/Auth/Auth.php @@ -20,7 +20,7 @@ // //require_once "PEAR.php"; -require_once DOL_DOCUMENT_ROOT."/includes/pear/PEAR.php"; +require_once PEAR_PATH."/PEAR.php"; define("AUTH_IDLED", -1); @@ -188,7 +188,7 @@ class DOLIAuth { $storage_path = "Auth/Container/" . $driver . ".php"; $storage_class = "Auth_Container_" . $driver; - require_once DOL_DOCUMENT_ROOT."/includes/pear/".$storage_path; + require_once PEAR_PATH."/".$storage_path; return new $storage_class($options); } diff --git a/htdocs/includes/pear/Auth/Container/DB.php b/htdocs/includes/pear/Auth/Container/DB.php index 695230bba5b..155a91f727d 100644 --- a/htdocs/includes/pear/Auth/Container/DB.php +++ b/htdocs/includes/pear/Auth/Container/DB.php @@ -20,9 +20,9 @@ // //require_once 'Auth/Container.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/Auth/Container.php"; +require_once PEAR_PATH."/Auth/Container.php"; //require_once 'DB.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/DB.php"; +require_once PEAR_PATH."/DB.php"; /** * Storage driver for fetching login data from a database diff --git a/htdocs/includes/pear/Auth/Container/LDAP.php b/htdocs/includes/pear/Auth/Container/LDAP.php index addb2682978..ba291febcda 100644 --- a/htdocs/includes/pear/Auth/Container/LDAP.php +++ b/htdocs/includes/pear/Auth/Container/LDAP.php @@ -21,8 +21,8 @@ // require_once 'PEAR.php'; // require_once 'Auth/Container.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/PEAR.php"; -require_once DOL_DOCUMENT_ROOT."/includes/pear/Auth/Container.php"; +require_once PEAR_PATH."/PEAR.php"; +require_once PEAR_PATH."/Auth/Container.php"; /** * Storage driver for fetching login data from LDAP diff --git a/htdocs/includes/pear/Auth/Container/MDB2.php b/htdocs/includes/pear/Auth/Container/MDB2.php index db9e98aae17..716c50ffd35 100644 --- a/htdocs/includes/pear/Auth/Container/MDB2.php +++ b/htdocs/includes/pear/Auth/Container/MDB2.php @@ -26,13 +26,13 @@ * Include Auth_Container base class */ //require_once 'Auth/Container.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/Auth/Container.php"; +require_once PEAR_PATH."/Auth/Container.php"; /** * Include PEAR MDB2 package */ //require_once 'MDB2.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2.php"; +require_once PEAR_PATH."/MDB2.php"; /** * Storage driver for fetching login data from a database diff --git a/htdocs/includes/pear/DB.php b/htdocs/includes/pear/DB.php index 4b6d4f5c47c..8fd7d00f450 100644 --- a/htdocs/includes/pear/DB.php +++ b/htdocs/includes/pear/DB.php @@ -23,7 +23,7 @@ // //require_once "PEAR.php"; -require_once DOL_DOCUMENT_ROOT."/includes/pear/PEAR.php"; +require_once PEAR_PATH."/PEAR.php"; // {{{ constants // {{{ error codes @@ -225,7 +225,7 @@ class DB function &factory($type) { - include_once(DOL_DOCUMENT_ROOT."/includes/pear/DB/${type}.php"); + include_once(PEAR_PATH."/DB/${type}.php"); $classname = "DB_${type}"; @@ -274,9 +274,9 @@ class DB if (is_array($options) && isset($options["debug"]) && $options["debug"] >= 2) { // expose php errors with sufficient debug level - include_once DOL_DOCUMENT_ROOT."/includes/pear/DB/${type}.php"; + include_once PEAR_PATH."/DB/${type}.php"; } else { - include_once DOL_DOCUMENT_ROOT."/includes/pear/DB/${type}.php"; + include_once PEAR_PATH."/DB/${type}.php"; } $classname = "DB_${type}"; diff --git a/htdocs/includes/pear/DB/common.php b/htdocs/includes/pear/DB/common.php index c2a930c4e2f..8dabbd14009 100644 --- a/htdocs/includes/pear/DB/common.php +++ b/htdocs/includes/pear/DB/common.php @@ -27,7 +27,7 @@ */ //require_once "PEAR.php"; -require_once DOL_DOCUMENT_ROOT."/includes/pear/PEAR.php"; +require_once PEAR_PATH."/PEAR.php"; class DB_common extends DOLIPEAR { diff --git a/htdocs/includes/pear/DB/ldap.php b/htdocs/includes/pear/DB/ldap.php index addb2682978..ba291febcda 100644 --- a/htdocs/includes/pear/DB/ldap.php +++ b/htdocs/includes/pear/DB/ldap.php @@ -21,8 +21,8 @@ // require_once 'PEAR.php'; // require_once 'Auth/Container.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/PEAR.php"; -require_once DOL_DOCUMENT_ROOT."/includes/pear/Auth/Container.php"; +require_once PEAR_PATH."/PEAR.php"; +require_once PEAR_PATH."/Auth/Container.php"; /** * Storage driver for fetching login data from LDAP diff --git a/htdocs/includes/pear/DB/ldap2.php b/htdocs/includes/pear/DB/ldap2.php index 1e1d07b2234..90d1cff6316 100644 --- a/htdocs/includes/pear/DB/ldap2.php +++ b/htdocs/includes/pear/DB/ldap2.php @@ -26,7 +26,7 @@ // // require_once 'DB/common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/DB/common.php"; +require_once PEAR_PATH."/DB/common.php"; /** * LDAP2 DB interface class diff --git a/htdocs/includes/pear/DB/ldap3.php b/htdocs/includes/pear/DB/ldap3.php index 23680a72f26..e6557767f48 100644 --- a/htdocs/includes/pear/DB/ldap3.php +++ b/htdocs/includes/pear/DB/ldap3.php @@ -24,8 +24,8 @@ // require_once 'DB/common.php'; // require_once 'DB/ldap2.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/DB/common.php"; -require_once DOL_DOCUMENT_ROOT."/includes/pear/DB/ldap2.php"; +require_once PEAR_PATH."/DB/common.php"; +require_once PEAR_PATH."/DB/ldap2.php"; /** * LDAP3 DB interface class diff --git a/htdocs/includes/pear/DB/mysql.php b/htdocs/includes/pear/DB/mysql.php index 3f48eed3e1b..fee3db43ff5 100644 --- a/htdocs/includes/pear/DB/mysql.php +++ b/htdocs/includes/pear/DB/mysql.php @@ -30,7 +30,7 @@ // //require_once 'DB/common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/DB/common.php"; +require_once PEAR_PATH."/DB/common.php"; class DB_mysql extends DB_common { diff --git a/htdocs/includes/pear/DB/pgsql.php b/htdocs/includes/pear/DB/pgsql.php index e87cfb7e2cb..a6cec7780be 100644 --- a/htdocs/includes/pear/DB/pgsql.php +++ b/htdocs/includes/pear/DB/pgsql.php @@ -24,7 +24,7 @@ // //require_once 'DB/common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/DB/common.php"; +require_once PEAR_PATH."/DB/common.php"; class DB_pgsql extends DB_common diff --git a/htdocs/includes/pear/MDB2.php b/htdocs/includes/pear/MDB2.php index 3db0adc3e63..94c3e95b3a3 100644 --- a/htdocs/includes/pear/MDB2.php +++ b/htdocs/includes/pear/MDB2.php @@ -53,7 +53,7 @@ */ //require_once 'PEAR.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/PEAR.php"; +require_once PEAR_PATH."/PEAR.php"; // {{{ Error constants diff --git a/htdocs/includes/pear/MDB2/Driver/Datatype/Common.php b/htdocs/includes/pear/MDB2/Driver/Datatype/Common.php index 0eead0ee60b..1906a0f1c12 100644 --- a/htdocs/includes/pear/MDB2/Driver/Datatype/Common.php +++ b/htdocs/includes/pear/MDB2/Driver/Datatype/Common.php @@ -45,7 +45,7 @@ // $Id$ //require_once 'MDB2/LOB.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/LOB.php"; +require_once PEAR_PATH."/MDB2/LOB.php"; /** * @package MDB2 diff --git a/htdocs/includes/pear/MDB2/Driver/Datatype/mssql.php b/htdocs/includes/pear/MDB2/Driver/Datatype/mssql.php index 3eef66716d6..837e388d9a7 100644 --- a/htdocs/includes/pear/MDB2/Driver/Datatype/mssql.php +++ b/htdocs/includes/pear/MDB2/Driver/Datatype/mssql.php @@ -48,7 +48,7 @@ // //require_once 'MDB2/Driver/Datatype/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Datatype/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Datatype/Common.php"; /** * MDB2 MS SQL driver diff --git a/htdocs/includes/pear/MDB2/Driver/Datatype/mysql.php b/htdocs/includes/pear/MDB2/Driver/Datatype/mysql.php index 6d6e9c670ad..033c27d0c64 100644 --- a/htdocs/includes/pear/MDB2/Driver/Datatype/mysql.php +++ b/htdocs/includes/pear/MDB2/Driver/Datatype/mysql.php @@ -47,7 +47,7 @@ // //require_once 'MDB2/Driver/Datatype/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Datatype/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Datatype/Common.php"; /** * MDB2 MySQL driver diff --git a/htdocs/includes/pear/MDB2/Driver/Datatype/mysqli.php b/htdocs/includes/pear/MDB2/Driver/Datatype/mysqli.php index 5dcf17f3733..85920072cc0 100644 --- a/htdocs/includes/pear/MDB2/Driver/Datatype/mysqli.php +++ b/htdocs/includes/pear/MDB2/Driver/Datatype/mysqli.php @@ -47,7 +47,7 @@ // //require_once 'MDB2/Driver/Datatype/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Datatype/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Datatype/Common.php"; /** * MDB2 MySQLi driver diff --git a/htdocs/includes/pear/MDB2/Driver/Datatype/pgsql.php b/htdocs/includes/pear/MDB2/Driver/Datatype/pgsql.php index abafb2412b1..cea885af310 100644 --- a/htdocs/includes/pear/MDB2/Driver/Datatype/pgsql.php +++ b/htdocs/includes/pear/MDB2/Driver/Datatype/pgsql.php @@ -45,7 +45,7 @@ // $Id$ //require_once 'MDB2/Driver/Datatype/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Datatype/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Datatype/Common.php"; /** * MDB2 PostGreSQL driver diff --git a/htdocs/includes/pear/MDB2/Driver/Function/mssql.php b/htdocs/includes/pear/MDB2/Driver/Function/mssql.php index a4ba5121036..7cdfe35e20d 100644 --- a/htdocs/includes/pear/MDB2/Driver/Function/mssql.php +++ b/htdocs/includes/pear/MDB2/Driver/Function/mssql.php @@ -46,7 +46,7 @@ // //require_once 'MDB2/Driver/Function/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Function/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Function/Common.php"; // {{{ class MDB2_Driver_Function_mssql /** diff --git a/htdocs/includes/pear/MDB2/Driver/Function/mysql.php b/htdocs/includes/pear/MDB2/Driver/Function/mysql.php index ffe1b7e136d..1705529cc1a 100644 --- a/htdocs/includes/pear/MDB2/Driver/Function/mysql.php +++ b/htdocs/includes/pear/MDB2/Driver/Function/mysql.php @@ -46,7 +46,7 @@ // //require_once 'MDB2/Driver/Function/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Function/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Function/Common.php"; /** * MDB2 MySQL driver for the function modules diff --git a/htdocs/includes/pear/MDB2/Driver/Function/mysqli.php b/htdocs/includes/pear/MDB2/Driver/Function/mysqli.php index 85881862fad..1401cf4c2f3 100644 --- a/htdocs/includes/pear/MDB2/Driver/Function/mysqli.php +++ b/htdocs/includes/pear/MDB2/Driver/Function/mysqli.php @@ -46,7 +46,7 @@ // //require_once 'MDB2/Driver/Function/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Function/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Function/Common.php"; /** * MDB2 MySQLi driver for the function modules diff --git a/htdocs/includes/pear/MDB2/Driver/Function/pgsql.php b/htdocs/includes/pear/MDB2/Driver/Function/pgsql.php index ebf28ff1185..86e035fa967 100644 --- a/htdocs/includes/pear/MDB2/Driver/Function/pgsql.php +++ b/htdocs/includes/pear/MDB2/Driver/Function/pgsql.php @@ -45,7 +45,7 @@ // $Id$ //require_once 'MDB2/Driver/Function/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Function/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Function/Common.php"; /** * MDB2 MySQL driver for the function modules diff --git a/htdocs/includes/pear/MDB2/Driver/Native/mssql.php b/htdocs/includes/pear/MDB2/Driver/Native/mssql.php index 88be9ff3436..66ca2a46a96 100644 --- a/htdocs/includes/pear/MDB2/Driver/Native/mssql.php +++ b/htdocs/includes/pear/MDB2/Driver/Native/mssql.php @@ -46,7 +46,7 @@ // //require_once 'MDB2/Driver/Native/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Native/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Native/Common.php"; /** * MDB2 MSSQL driver for the native module diff --git a/htdocs/includes/pear/MDB2/Driver/Native/mysql.php b/htdocs/includes/pear/MDB2/Driver/Native/mysql.php index b0a2c72e8af..2779deae33e 100644 --- a/htdocs/includes/pear/MDB2/Driver/Native/mysql.php +++ b/htdocs/includes/pear/MDB2/Driver/Native/mysql.php @@ -46,7 +46,7 @@ // //require_once 'MDB2/Driver/Native/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Native/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Native/Common.php"; /** * MDB2 MySQL driver for the native module diff --git a/htdocs/includes/pear/MDB2/Driver/Native/mysqli.php b/htdocs/includes/pear/MDB2/Driver/Native/mysqli.php index 4b5b466a8c0..0b44a0eb56a 100644 --- a/htdocs/includes/pear/MDB2/Driver/Native/mysqli.php +++ b/htdocs/includes/pear/MDB2/Driver/Native/mysqli.php @@ -46,7 +46,7 @@ // //require_once 'MDB2/Driver/Native/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Native/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Native/Common.php"; /** * MDB2 MySQLi driver for the native module diff --git a/htdocs/includes/pear/MDB2/Driver/Native/pgsql.php b/htdocs/includes/pear/MDB2/Driver/Native/pgsql.php index 9b076a4d764..24b604fb31b 100644 --- a/htdocs/includes/pear/MDB2/Driver/Native/pgsql.php +++ b/htdocs/includes/pear/MDB2/Driver/Native/pgsql.php @@ -45,7 +45,7 @@ // $Id$ //require_once 'MDB2/Driver/Native/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Native/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Native/Common.php"; /** * MDB2 PostGreSQL driver for the native module diff --git a/htdocs/includes/pear/MDB2/Driver/Reverse/mssql.php b/htdocs/includes/pear/MDB2/Driver/Reverse/mssql.php index cf7dfb571d2..6859f246507 100644 --- a/htdocs/includes/pear/MDB2/Driver/Reverse/mssql.php +++ b/htdocs/includes/pear/MDB2/Driver/Reverse/mssql.php @@ -46,7 +46,7 @@ // //require_once 'MDB2/Driver/Reverse/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Reverse/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Reverse/Common.php"; /** * MDB2 MSSQL driver for the schema reverse engineering module diff --git a/htdocs/includes/pear/MDB2/Driver/Reverse/mysql.php b/htdocs/includes/pear/MDB2/Driver/Reverse/mysql.php index 5a1ebbc6d41..aae340390ec 100644 --- a/htdocs/includes/pear/MDB2/Driver/Reverse/mysql.php +++ b/htdocs/includes/pear/MDB2/Driver/Reverse/mysql.php @@ -46,7 +46,7 @@ // //require_once 'MDB2/Driver/Reverse/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Reverse/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Reverse/Common.php"; /** * MDB2 MySQL driver for the schema reverse engineering module diff --git a/htdocs/includes/pear/MDB2/Driver/Reverse/mysqli.php b/htdocs/includes/pear/MDB2/Driver/Reverse/mysqli.php index 0bfdb6f0d39..1516521ef2e 100644 --- a/htdocs/includes/pear/MDB2/Driver/Reverse/mysqli.php +++ b/htdocs/includes/pear/MDB2/Driver/Reverse/mysqli.php @@ -46,7 +46,7 @@ // //require_once 'MDB2/Driver/Reverse/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Reverse/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Reverse/Common.php"; /** * MDB2 MySQLi driver for the schema reverse engineering module diff --git a/htdocs/includes/pear/MDB2/Driver/Reverse/pgsql.php b/htdocs/includes/pear/MDB2/Driver/Reverse/pgsql.php index 1eb4cd4d24d..8a1c2f9dfab 100644 --- a/htdocs/includes/pear/MDB2/Driver/Reverse/pgsql.php +++ b/htdocs/includes/pear/MDB2/Driver/Reverse/pgsql.php @@ -45,7 +45,7 @@ // $Id$ //require_once 'MDB2/Driver/Reverse/Common.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2/Driver/Reverse/Common.php"; +require_once PEAR_PATH."/MDB2/Driver/Reverse/Common.php"; /** * MDB2 PostGreSQL driver for the schema reverse engineering module diff --git a/htdocs/includes/pear/MDB2/LOB.php b/htdocs/includes/pear/MDB2/LOB.php index d8d5fa13b5b..043d96af57e 100644 --- a/htdocs/includes/pear/MDB2/LOB.php +++ b/htdocs/includes/pear/MDB2/LOB.php @@ -51,7 +51,7 @@ */ //require_once 'MDB2.php'; -require_once DOL_DOCUMENT_ROOT."/includes/pear/MDB2.php"; +require_once PEAR_PATH."/MDB2.php"; /** * MDB2_LOB: user land stream wrapper implementation for LOB support diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 0ac8504fb19..9144e2e51c5 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -104,7 +104,7 @@ if (! session_id() || ! isset($_SESSION["dol_login"])) // MODE DOLIBARR if (in_array('dolibarr',$authmode) && ! $login) { - require_once(DOL_DOCUMENT_ROOT."/includes/pear/Auth/Auth.php"); + require_once(PEAR_PATH."/Auth/Auth.php"); $pear = $dolibarr_main_db_type.'://'.$dolibarr_main_db_user.':'.$dolibarr_main_db_pass.'@'.$dolibarr_main_db_host.'/'.$dolibarr_main_db_name; @@ -155,7 +155,7 @@ if (! session_id() || ! isset($_SESSION["dol_login"])) // Ajout du mode MDB2 pour test uniquement if (in_array('dolibarr_mdb2',$authmode) && ! $login) { - require_once(DOL_DOCUMENT_ROOT."/includes/pear/Auth/Auth.php"); + require_once(PEAR_PATH."/Auth/Auth.php"); $pear = $dolibarr_main_db_type.'://'.$dolibarr_main_db_user.':'.$dolibarr_main_db_pass.'@'.$dolibarr_main_db_host.'/'.$dolibarr_main_db_name; @@ -206,7 +206,7 @@ if (! session_id() || ! isset($_SESSION["dol_login"])) if ($conf->ldap->enabled && in_array('ldap',$authmode) && ! $login) { // Authentification Apache KO ou non active, pas de mode force on demande le login - require_once(DOL_DOCUMENT_ROOT."/includes/pear/Auth/Auth.php"); + require_once(PEAR_PATH."/Auth/Auth.php"); #$ldapdebug=true; if ($ldapdebug) print "DEBUG: Traces connexions LDAP
\n"; diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php index 47197fde765..3dab8222203 100644 --- a/htdocs/user/logout.php +++ b/htdocs/user/logout.php @@ -32,7 +32,7 @@ if (!empty ($_SERVER["REMOTE_USER"])) include_once("../conf/conf.php"); require_once("../master.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/includes/pear/Auth/Auth.php"); +require_once(PEAR_PATH."/Auth/Auth.php"); dolibarr_syslog("End session in DOLSESSID_".$dolibarr_main_db_name);