Fix: les classes dans le PEAR embarqué avait était renommé en DOLIPEAR. Cependant, il resté encore des référence en PEAR.
This commit is contained in:
parent
5f31e7892d
commit
b144f3af52
@ -18,8 +18,10 @@
|
|||||||
//
|
//
|
||||||
// $Id$
|
// $Id$
|
||||||
//
|
//
|
||||||
require_once DOL_DOCUMENT_ROOT."/includes/pear/PEAR.php";
|
|
||||||
//require_once "PEAR.php";
|
//require_once "PEAR.php";
|
||||||
|
require_once DOL_DOCUMENT_ROOT."/includes/pear/PEAR.php";
|
||||||
|
|
||||||
|
|
||||||
define("AUTH_IDLED", -1);
|
define("AUTH_IDLED", -1);
|
||||||
define("AUTH_EXPIRED", -2);
|
define("AUTH_EXPIRED", -2);
|
||||||
|
|||||||
@ -74,7 +74,7 @@ class Auth_Container_DB extends Auth_Container
|
|||||||
$this->_parseOptions($dsn);
|
$this->_parseOptions($dsn);
|
||||||
|
|
||||||
if (empty($this->options['dsn'])) {
|
if (empty($this->options['dsn'])) {
|
||||||
PEAR::raiseError('No connection parameters specified!');
|
DOLIPEAR::raiseError('No connection parameters specified!');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->options['dsn'] = $dsn;
|
$this->options['dsn'] = $dsn;
|
||||||
@ -98,9 +98,9 @@ class Auth_Container_DB extends Auth_Container
|
|||||||
} elseif (get_parent_class($dsn) == "db_common") {
|
} elseif (get_parent_class($dsn) == "db_common") {
|
||||||
$this->db = $dsn;
|
$this->db = $dsn;
|
||||||
} elseif (DB::isError($dsn)) {
|
} elseif (DB::isError($dsn)) {
|
||||||
return PEAR::raiseError($dsn->getMessage(), $dsn->getCode());
|
return DOLIPEAR::raiseError($dsn->getMessage(), $dsn->getCode());
|
||||||
} else {
|
} else {
|
||||||
return PEAR::raiseError('The given dsn was not valid in file ' . __FILE__ . ' at line ' . __LINE__,
|
return DOLIPEAR::raiseError('The given dsn was not valid in file ' . __FILE__ . ' at line ' . __LINE__,
|
||||||
41,
|
41,
|
||||||
PEAR_ERROR_RETURN,
|
PEAR_ERROR_RETURN,
|
||||||
null,
|
null,
|
||||||
@ -228,7 +228,7 @@ class Auth_Container_DB extends Auth_Container
|
|||||||
// Prepare for a database query
|
// Prepare for a database query
|
||||||
$err = $this->_prepare();
|
$err = $this->_prepare();
|
||||||
if ($err !== true) {
|
if ($err !== true) {
|
||||||
return PEAR::raiseError($err->getMessage(), $err->getCode());
|
return DOLIPEAR::raiseError($err->getMessage(), $err->getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find if db_fileds contains a *, i so assume all col are selected
|
// Find if db_fileds contains a *, i so assume all col are selected
|
||||||
@ -249,7 +249,7 @@ class Auth_Container_DB extends Auth_Container
|
|||||||
$res = $this->db->getRow($query, $query_params, DB_FETCHMODE_ASSOC);
|
$res = $this->db->getRow($query, $query_params, DB_FETCHMODE_ASSOC);
|
||||||
|
|
||||||
if (DB::isError($res)) {
|
if (DB::isError($res)) {
|
||||||
return PEAR::raiseError($res->getMessage(), $res->getCode());
|
return DOLIPEAR::raiseError($res->getMessage(), $res->getCode());
|
||||||
}
|
}
|
||||||
if (!is_array($res)) {
|
if (!is_array($res)) {
|
||||||
$this->activeUser = '';
|
$this->activeUser = '';
|
||||||
@ -281,7 +281,7 @@ class Auth_Container_DB extends Auth_Container
|
|||||||
{
|
{
|
||||||
$err = $this->_prepare();
|
$err = $this->_prepare();
|
||||||
if ($err !== true) {
|
if ($err !== true) {
|
||||||
return PEAR::raiseError($err->getMessage(), $err->getCode());
|
return DOLIPEAR::raiseError($err->getMessage(), $err->getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
$retVal = array();
|
$retVal = array();
|
||||||
@ -301,7 +301,7 @@ class Auth_Container_DB extends Auth_Container
|
|||||||
$res = $this->db->getAll($query, null, DB_FETCHMODE_ASSOC);
|
$res = $this->db->getAll($query, null, DB_FETCHMODE_ASSOC);
|
||||||
|
|
||||||
if (DB::isError($res)) {
|
if (DB::isError($res)) {
|
||||||
return PEAR::raiseError($res->getMessage(), $res->getCode());
|
return DOLIPEAR::raiseError($res->getMessage(), $res->getCode());
|
||||||
} else {
|
} else {
|
||||||
foreach ($res as $user) {
|
foreach ($res as $user) {
|
||||||
$user['username'] = $user[$this->options['usernamecol']];
|
$user['username'] = $user[$this->options['usernamecol']];
|
||||||
@ -355,7 +355,7 @@ class Auth_Container_DB extends Auth_Container
|
|||||||
$res = $this->query($query);
|
$res = $this->query($query);
|
||||||
|
|
||||||
if (DB::isError($res)) {
|
if (DB::isError($res)) {
|
||||||
return PEAR::raiseError($res->getMessage(), $res->getCode());
|
return DOLIPEAR::raiseError($res->getMessage(), $res->getCode());
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -383,7 +383,7 @@ class Auth_Container_DB extends Auth_Container
|
|||||||
$res = $this->query($query);
|
$res = $this->query($query);
|
||||||
|
|
||||||
if (DB::isError($res)) {
|
if (DB::isError($res)) {
|
||||||
return PEAR::raiseError($res->getMessage(), $res->getCode());
|
return DOLIPEAR::raiseError($res->getMessage(), $res->getCode());
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
//require_once "PEAR.php";
|
//require_once "PEAR.php";
|
||||||
require_once DOL_DOCUMENT_ROOT."/includes/pear/PEAR.php";
|
require_once DOL_DOCUMENT_ROOT."/includes/pear/PEAR.php";
|
||||||
|
|
||||||
// {{{ constants
|
// {{{ constants
|
||||||
// {{{ error codes
|
// {{{ error codes
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
* inherited by all such.
|
* inherited by all such.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//require_once "PEAR.php";
|
||||||
require_once DOL_DOCUMENT_ROOT."/includes/pear/PEAR.php";
|
require_once DOL_DOCUMENT_ROOT."/includes/pear/PEAR.php";
|
||||||
|
|
||||||
class DB_common extends DOLIPEAR
|
class DB_common extends DOLIPEAR
|
||||||
|
|||||||
@ -19,8 +19,10 @@
|
|||||||
// $Id$
|
// $Id$
|
||||||
//
|
//
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT."/includes/pear/Auth/Container.php";
|
// 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/PEAR.php";
|
||||||
|
require_once DOL_DOCUMENT_ROOT."/includes/pear/Auth/Container.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Storage driver for fetching login data from LDAP
|
* Storage driver for fetching login data from LDAP
|
||||||
@ -176,7 +178,7 @@ class Auth_Container_LDAP extends Auth_Container
|
|||||||
function Auth_Container_LDAP($params)
|
function Auth_Container_LDAP($params)
|
||||||
{
|
{
|
||||||
if (false === extension_loaded('ldap')) {
|
if (false === extension_loaded('ldap')) {
|
||||||
return PEAR::raiseError('Auth_Container_LDAP: LDAP Extension not loaded', 41, PEAR_ERROR_DIE);
|
return DOLIPEAR::raiseError('Auth_Container_LDAP: LDAP Extension not loaded', 41, PEAR_ERROR_DIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_setDefaults();
|
$this->_setDefaults();
|
||||||
@ -207,7 +209,7 @@ class Auth_Container_LDAP extends Auth_Container
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (($this->conn_id = @call_user_func_array('ldap_connect', $conn_params)) === false) {
|
if (($this->conn_id = @call_user_func_array('ldap_connect', $conn_params)) === false) {
|
||||||
return PEAR::raiseError('Auth_Container_LDAP: Could not connect to server.', 41, PEAR_ERROR_DIE);
|
return DOLIPEAR::raiseError('Auth_Container_LDAP: Could not connect to server.', 41, PEAR_ERROR_DIE);
|
||||||
}
|
}
|
||||||
$this->_debug('Successfully connected to server', __LINE__);
|
$this->_debug('Successfully connected to server', __LINE__);
|
||||||
|
|
||||||
@ -229,7 +231,7 @@ class Auth_Container_LDAP extends Auth_Container
|
|||||||
if ((@call_user_func_array('ldap_bind', $bind_params)) == false) {
|
if ((@call_user_func_array('ldap_bind', $bind_params)) == false) {
|
||||||
$this->_debug();
|
$this->_debug();
|
||||||
$this->_disconnect();
|
$this->_disconnect();
|
||||||
return PEAR::raiseError("Auth_Container_LDAP: Could not bind to LDAP server.", 41, PEAR_ERROR_DIE);
|
return DOLIPEAR::raiseError("Auth_Container_LDAP: Could not bind to LDAP server.", 41, PEAR_ERROR_DIE);
|
||||||
}
|
}
|
||||||
$this->_debug('Binding was successful', __LINE__);
|
$this->_debug('Binding was successful', __LINE__);
|
||||||
}
|
}
|
||||||
@ -277,7 +279,7 @@ class Auth_Container_LDAP extends Auth_Container
|
|||||||
|
|
||||||
// if base ist still not set, raise error
|
// if base ist still not set, raise error
|
||||||
if ($this->options['basedn'] == "") {
|
if ($this->options['basedn'] == "") {
|
||||||
return PEAR::raiseError("Auth_Container_LDAP: LDAP search base not specified!", 41, PEAR_ERROR_DIE);
|
return DOLIPEAR::raiseError("Auth_Container_LDAP: LDAP search base not specified!", 41, PEAR_ERROR_DIE);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
// $Id$
|
// $Id$
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// require_once 'DB/common.php';
|
||||||
require_once DOL_DOCUMENT_ROOT."/includes/pear/DB/common.php";
|
require_once DOL_DOCUMENT_ROOT."/includes/pear/DB/common.php";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -22,6 +22,8 @@
|
|||||||
// $Id$
|
// $Id$
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// 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/common.php";
|
||||||
require_once DOL_DOCUMENT_ROOT."/includes/pear/DB/ldap2.php";
|
require_once DOL_DOCUMENT_ROOT."/includes/pear/DB/ldap2.php";
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,7 @@
|
|||||||
// be registered here.
|
// be registered here.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
//require_once 'DB/common.php';
|
||||||
require_once DOL_DOCUMENT_ROOT."/includes/pear/DB/common.php";
|
require_once DOL_DOCUMENT_ROOT."/includes/pear/DB/common.php";
|
||||||
|
|
||||||
class DB_mysql extends DB_common
|
class DB_mysql extends DB_common
|
||||||
|
|||||||
@ -23,7 +23,9 @@
|
|||||||
// extension.
|
// extension.
|
||||||
//
|
//
|
||||||
|
|
||||||
require_once 'DB/common.php';
|
//require_once 'DB/common.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT."/includes/pear/DB/common.php";
|
||||||
|
|
||||||
|
|
||||||
class DB_pgsql extends DB_common
|
class DB_pgsql extends DB_common
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user