mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
renommage de PEAR en DOLIPEAR
This commit is contained in:
parent
1c5df696a7
commit
cb9b95f26d
|
|
@ -102,7 +102,7 @@ class Auth_Container_DB extends Auth_Container
|
|||
} else {
|
||||
return DOLIPEAR::raiseError('The given dsn was not valid in file ' . __FILE__ . ' at line ' . __LINE__,
|
||||
41,
|
||||
PEAR_ERROR_RETURN,
|
||||
DOLIPEAR_ERROR_RETURN,
|
||||
null,
|
||||
null
|
||||
);
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class Auth_Container_MDB2 extends Auth_Container
|
|||
} else {
|
||||
return DOLIPEAR::raiseError('The given dsn was not valid in file ' . __FILE__ . ' at line ' . __LINE__,
|
||||
41,
|
||||
PEAR_ERROR_RETURN,
|
||||
DOLIPEAR_ERROR_RETURN,
|
||||
null,
|
||||
null
|
||||
);
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ class DB_mysql extends DB_common
|
|||
$seqname = $this->getSequenceName($seq_name);
|
||||
do {
|
||||
$repeat = 0;
|
||||
$this->pushErrorHandling(PEAR_ERROR_RETURN);
|
||||
$this->pushErrorHandling(DOLIPEAR_ERROR_RETURN);
|
||||
$result = $this->query("UPDATE ${seqname} ".
|
||||
'SET id=LAST_INSERT_ID(id+1)');
|
||||
$this->popErrorHandling();
|
||||
|
|
|
|||
|
|
@ -660,7 +660,7 @@ class DB_mysqli extends DB_common
|
|||
$seqname = $this->getSequenceName($seq_name);
|
||||
do {
|
||||
$repeat = 0;
|
||||
$this->pushErrorHandling(PEAR_ERROR_RETURN);
|
||||
$this->pushErrorHandling(DOLIPEAR_ERROR_RETURN);
|
||||
$result = $this->query('UPDATE ' . $seqname
|
||||
. ' SET id = LAST_INSERT_ID(id + 1)');
|
||||
$this->popErrorHandling();
|
||||
|
|
|
|||
|
|
@ -474,13 +474,13 @@ class DB_pgsql extends DB_common
|
|||
$seqname = $this->getSequenceName($seq_name);
|
||||
$repeat = false;
|
||||
do {
|
||||
$this->pushErrorHandling(PEAR_ERROR_RETURN);
|
||||
$this->pushErrorHandling(DOLIPEAR_ERROR_RETURN);
|
||||
$result = $this->query("SELECT NEXTVAL('${seqname}')");
|
||||
$this->popErrorHandling();
|
||||
if ($ondemand && DB::isError($result) &&
|
||||
$result->getCode() == DB_ERROR_NOSUCHTABLE) {
|
||||
$repeat = true;
|
||||
$this->pushErrorHandling(PEAR_ERROR_RETURN);
|
||||
$this->pushErrorHandling(DOLIPEAR_ERROR_RETURN);
|
||||
$result = $this->createSequence($seq_name);
|
||||
$this->popErrorHandling();
|
||||
if (DB::isError($result)) {
|
||||
|
|
|
|||
|
|
@ -964,7 +964,7 @@ class MDB2_Error extends DOLIPEAR_Error
|
|||
* @param int what error level to use for $mode & PEAR_ERROR_TRIGGER
|
||||
* @param smixed additional debug info, such as the last query
|
||||
*/
|
||||
function MDB2_Error($code = MDB2_ERROR, $mode = PEAR_ERROR_RETURN,
|
||||
function MDB2_Error($code = MDB2_ERROR, $mode = DOLIPEAR_ERROR_RETURN,
|
||||
$level = E_USER_NOTICE, $debuginfo = null)
|
||||
{
|
||||
if (is_null($code)) {
|
||||
|
|
@ -1441,7 +1441,7 @@ class MDB2_Driver_Common extends DOLIPEAR
|
|||
}
|
||||
|
||||
$err =& DOLIPEAR::raiseError(null, $code, $mode, $options, $userinfo, 'MDB2_Error', true);
|
||||
if ($err->getMode() !== PEAR_ERROR_RETURN
|
||||
if ($err->getMode() !== DOLIPEAR_ERROR_RETURN
|
||||
&& isset($this->nested_transaction_counter) && !$this->has_transaction_error) {
|
||||
$this->has_transaction_error =& $err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
// $Id$
|
||||
|
||||
//require_once 'MDB2/LOB.php';
|
||||
require_once PEAR_PATH."/MDB2/LOB.php';
|
||||
require_once PEAR_PATH."/MDB2/LOB.php";
|
||||
|
||||
/**
|
||||
* @package MDB2
|
||||
|
|
|
|||
|
|
@ -69,12 +69,12 @@ class MDB2_Driver_Native_pgsql extends MDB2_Driver_Native_Common
|
|||
function deleteOID($OID)
|
||||
{
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
|
||||
$connection = $db->getConnection();
|
||||
if (PEAR::isError($connection)) {
|
||||
if (DOLIPEAR::isError($connection)) {
|
||||
return $connection;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,11 +93,11 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
$where = false, $types = null, $result_types = MDB2_PREPARE_MANIP)
|
||||
{
|
||||
$query = $this->buildManipSQL($table, $table_fields, $mode, $where);
|
||||
if (PEAR::isError($query)) {
|
||||
if (DOLIPEAR::isError($query)) {
|
||||
return $query;
|
||||
}
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
return $db->prepare($query, $types, $result_types);
|
||||
|
|
@ -148,7 +148,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
$query = $this->buildManipSQL($table, $keys, $mode, $where);
|
||||
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
if ($mode == MDB2_AUTOQUERY_SELECT) {
|
||||
|
|
@ -158,7 +158,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
}
|
||||
} else {
|
||||
$stmt = $this->autoPrepare($table, $keys, $mode, $where, $types, $result_types);
|
||||
if (PEAR::isError($stmt)) {
|
||||
if (DOLIPEAR::isError($stmt)) {
|
||||
return $stmt;
|
||||
}
|
||||
$result =& $stmt->execute($params, $result_class);
|
||||
|
|
@ -194,7 +194,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
function buildManipSQL($table, $table_fields, $mode, $where = false)
|
||||
{
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
|
||||
|
|
@ -268,12 +268,12 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
$result_wrap_class = false)
|
||||
{
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
|
||||
$result = $db->setLimit($limit, $offset);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
$result =& $db->query($query, $types, $result_class, $result_wrap_class);
|
||||
|
|
@ -297,7 +297,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
function execParam($query, $params = array(), $param_types = null)
|
||||
{
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
|
||||
|
|
@ -307,12 +307,12 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
}
|
||||
|
||||
$stmt = $db->prepare($query, $param_types, MDB2_PREPARE_MANIP);
|
||||
if (PEAR::isError($stmt)) {
|
||||
if (DOLIPEAR::isError($stmt)) {
|
||||
return $stmt;
|
||||
}
|
||||
|
||||
$result = $stmt->execute($params);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
@ -341,7 +341,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
$param_types = null, $colnum = 0)
|
||||
{
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
|
||||
|
|
@ -352,7 +352,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
}
|
||||
|
||||
$stmt = $db->prepare($query, $param_types, $type);
|
||||
if (PEAR::isError($stmt)) {
|
||||
if (DOLIPEAR::isError($stmt)) {
|
||||
return $stmt;
|
||||
}
|
||||
|
||||
|
|
@ -388,7 +388,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
$param_types = null, $fetchmode = MDB2_FETCHMODE_DEFAULT)
|
||||
{
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
}
|
||||
|
||||
$stmt = $db->prepare($query, $param_types, $types);
|
||||
if (PEAR::isError($stmt)) {
|
||||
if (DOLIPEAR::isError($stmt)) {
|
||||
return $stmt;
|
||||
}
|
||||
|
||||
|
|
@ -434,7 +434,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
$param_types = null, $colnum = 0)
|
||||
{
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
|
||||
|
|
@ -445,7 +445,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
}
|
||||
|
||||
$stmt = $db->prepare($query, $param_types, $type);
|
||||
if (PEAR::isError($stmt)) {
|
||||
if (DOLIPEAR::isError($stmt)) {
|
||||
return $stmt;
|
||||
}
|
||||
|
||||
|
|
@ -490,7 +490,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
$rekey = false, $force_array = false, $group = false)
|
||||
{
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
|
||||
|
|
@ -500,7 +500,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
}
|
||||
|
||||
$stmt = $db->prepare($query, $param_types, $types);
|
||||
if (PEAR::isError($stmt)) {
|
||||
if (DOLIPEAR::isError($stmt)) {
|
||||
return $stmt;
|
||||
}
|
||||
|
||||
|
|
@ -595,7 +595,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
$fetchmode = MDB2_FETCHMODE_DEFAULT, $force_array = false, $group = false)
|
||||
{
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
|
||||
|
|
@ -605,7 +605,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
}
|
||||
|
||||
$stmt = $db->prepare($query, $param_types, $types);
|
||||
if (PEAR::isError($stmt)) {
|
||||
if (DOLIPEAR::isError($stmt)) {
|
||||
return $stmt;
|
||||
}
|
||||
|
||||
|
|
@ -642,7 +642,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
{
|
||||
for ($i = 0, $j = count($params); $i < $j; $i++) {
|
||||
$result = $stmt->execute($params[$i]);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
|
@ -667,14 +667,14 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
function getBeforeID($table, $field = null, $ondemand = true, $quote = true)
|
||||
{
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
|
||||
if ($db->supports('auto_increment') !== true) {
|
||||
$seq = $table.(empty($field) ? '' : '_'.$field);
|
||||
$id = $db->nextID($seq, $ondemand);
|
||||
if (!$quote || PEAR::isError($id)) {
|
||||
if (!$quote || DOLIPEAR::isError($id)) {
|
||||
return $id;
|
||||
}
|
||||
return $db->quote($id, 'integer');
|
||||
|
|
@ -700,7 +700,7 @@ class MDB2_Extended extends MDB2_Module_Common
|
|||
function getAfterID($id, $table, $field = null)
|
||||
{
|
||||
$db =& $this->getDBInstance();
|
||||
if (PEAR::isError($db)) {
|
||||
if (DOLIPEAR::isError($db)) {
|
||||
return $db;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class MDB2_Iterator implements Iterator
|
|||
{
|
||||
if (is_null($this->row)) {
|
||||
$row = $this->result->fetchRow($this->fetchmode);
|
||||
if (PEAR::isError($row)) {
|
||||
if (DOLIPEAR::isError($row)) {
|
||||
$row = false;
|
||||
}
|
||||
$this->row = $row;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user