forked from Wavyzz/dolibarr
renommage de PEAR en DOLIPEAR
This commit is contained in:
@@ -193,7 +193,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
$text = $this->escapePattern($text);
|
||||
}
|
||||
$connection = $this->getConnection();
|
||||
if (PEAR::isError($connection)) {
|
||||
if (DOLIPEAR::isError($connection)) {
|
||||
return $connection;
|
||||
}
|
||||
$text = @mysql_real_escape_string($text, $connection);
|
||||
@@ -235,7 +235,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
}
|
||||
$query = $this->start_transaction ? 'START TRANSACTION' : 'SET AUTOCOMMIT = 1';
|
||||
$result =& $this->_doQuery($query, true);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
$this->in_transaction = true;
|
||||
@@ -282,13 +282,13 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
}
|
||||
|
||||
$result =& $this->_doQuery('COMMIT', true);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
if (!$this->start_transaction) {
|
||||
$query = 'SET AUTOCOMMIT = 0';
|
||||
$result =& $this->_doQuery($query, true);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -328,13 +328,13 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
|
||||
$query = 'ROLLBACK';
|
||||
$result =& $this->_doQuery($query, true);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
if (!$this->start_transaction) {
|
||||
$query = 'SET AUTOCOMMIT = 0';
|
||||
$result =& $this->_doQuery($query, true);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -400,7 +400,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
$this->disconnect(false);
|
||||
}
|
||||
|
||||
if (!PEAR::loadExtension($this->phptype)) {
|
||||
if (!DOLIPEAR::loadExtension($this->phptype)) {
|
||||
return $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
|
||||
'extension '.$this->phptype.' is not compiled into PHP', __FUNCTION__);
|
||||
}
|
||||
@@ -445,7 +445,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
|
||||
if (!empty($this->dsn['charset'])) {
|
||||
$result = $this->setCharset($this->dsn['charset'], $connection);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -508,7 +508,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
{
|
||||
if (is_null($connection)) {
|
||||
$connection = $this->getConnection();
|
||||
if (PEAR::isError($connection)) {
|
||||
if (DOLIPEAR::isError($connection)) {
|
||||
return $connection;
|
||||
}
|
||||
}
|
||||
@@ -568,7 +568,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
$this->last_query = $query;
|
||||
$result = $this->debug($query, 'query', array('is_manip' => $is_manip, 'when' => 'pre'));
|
||||
if ($result) {
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
$query = $result;
|
||||
@@ -580,7 +580,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
|
||||
if (is_null($connection)) {
|
||||
$connection = $this->getConnection();
|
||||
if (PEAR::isError($connection)) {
|
||||
if (DOLIPEAR::isError($connection)) {
|
||||
return $connection;
|
||||
}
|
||||
}
|
||||
@@ -627,7 +627,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
{
|
||||
if (is_null($connection)) {
|
||||
$connection = $this->getConnection();
|
||||
if (PEAR::isError($connection)) {
|
||||
if (DOLIPEAR::isError($connection)) {
|
||||
return $connection;
|
||||
}
|
||||
}
|
||||
@@ -701,7 +701,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
function getServerVersion($native = false)
|
||||
{
|
||||
$connection = $this->getConnection();
|
||||
if (PEAR::isError($connection)) {
|
||||
if (DOLIPEAR::isError($connection)) {
|
||||
return $connection;
|
||||
}
|
||||
if ($this->connected_server_info) {
|
||||
@@ -846,7 +846,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
$query = $this->_modifyQuery($query, $is_manip, $limit, $offset);
|
||||
$result = $this->debug($query, __FUNCTION__, array('is_manip' => $is_manip, 'when' => 'pre'));
|
||||
if ($result) {
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
$query = $result;
|
||||
@@ -873,7 +873,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
}
|
||||
|
||||
$new_pos = $this->_skipDelimitedStrings($query, $position, $p_position);
|
||||
if (PEAR::isError($new_pos)) {
|
||||
if (DOLIPEAR::isError($new_pos)) {
|
||||
return $new_pos;
|
||||
}
|
||||
if ($new_pos != $position) {
|
||||
@@ -910,13 +910,13 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
}
|
||||
}
|
||||
$connection = $this->getConnection();
|
||||
if (PEAR::isError($connection)) {
|
||||
if (DOLIPEAR::isError($connection)) {
|
||||
return $connection;
|
||||
}
|
||||
$statement_name = sprintf($this->options['statement_format'], $this->phptype, md5(time() + rand()));
|
||||
$query = "PREPARE $statement_name FROM ".$this->quote($query, 'text');
|
||||
$statement =& $this->_doQuery($query, true, $connection);
|
||||
if (PEAR::isError($statement)) {
|
||||
if (DOLIPEAR::isError($statement)) {
|
||||
return $statement;
|
||||
}
|
||||
|
||||
@@ -1026,13 +1026,13 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
}
|
||||
|
||||
$connection = $this->getConnection();
|
||||
if (PEAR::isError($connection)) {
|
||||
if (DOLIPEAR::isError($connection)) {
|
||||
return $connection;
|
||||
}
|
||||
|
||||
$query = "REPLACE INTO $table ($query) VALUES ($values)";
|
||||
$result =& $this->_doQuery($query, true, $connection);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
return $this->_affectedRows($connection, $result);
|
||||
@@ -1060,11 +1060,11 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
$this->expectError(MDB2_ERROR_NOSUCHTABLE);
|
||||
$result =& $this->_doQuery($query, true);
|
||||
$this->popExpect();
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
if ($ondemand && $result->getCode() == MDB2_ERROR_NOSUCHTABLE) {
|
||||
$this->loadModule('Manager', null, true);
|
||||
$result = $this->manager->createSequence($seq_name);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $this->raiseError($result, null, null,
|
||||
'on demand sequence '.$seq_name.' could not be created', __FUNCTION__);
|
||||
} else {
|
||||
@@ -1077,7 +1077,7 @@ class MDB2_Driver_mysql extends MDB2_Driver_Common
|
||||
if (is_numeric($value)) {
|
||||
$query = "DELETE FROM $sequence_name WHERE $seqcol_name < $value";
|
||||
$result =& $this->_doQuery($query, true);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
$this->warnings[] = 'nextID: could not delete previous sequence table values from '.$seq_name;
|
||||
}
|
||||
}
|
||||
@@ -1145,7 +1145,7 @@ class MDB2_Result_mysql extends MDB2_Result_Common
|
||||
{
|
||||
if (!is_null($rownum)) {
|
||||
$seek = $this->seek($rownum);
|
||||
if (PEAR::isError($seek)) {
|
||||
if (DOLIPEAR::isError($seek)) {
|
||||
return $seek;
|
||||
}
|
||||
}
|
||||
@@ -1210,7 +1210,7 @@ class MDB2_Result_mysql extends MDB2_Result_Common
|
||||
{
|
||||
$columns = array();
|
||||
$numcols = $this->numCols();
|
||||
if (PEAR::isError($numcols)) {
|
||||
if (DOLIPEAR::isError($numcols)) {
|
||||
return $numcols;
|
||||
}
|
||||
for ($column = 0; $column < $numcols; $column++) {
|
||||
@@ -1319,7 +1319,7 @@ class MDB2_BufferedResult_mysql extends MDB2_Result_mysql
|
||||
function valid()
|
||||
{
|
||||
$numrows = $this->numRows();
|
||||
if (PEAR::isError($numrows)) {
|
||||
if (DOLIPEAR::isError($numrows)) {
|
||||
return $numrows;
|
||||
}
|
||||
return $this->rownum < ($numrows - 1);
|
||||
@@ -1384,7 +1384,7 @@ class MDB2_Statement_mysql extends MDB2_Statement_Common
|
||||
}
|
||||
|
||||
$connection = $this->db->getConnection();
|
||||
if (PEAR::isError($connection)) {
|
||||
if (DOLIPEAR::isError($connection)) {
|
||||
return $connection;
|
||||
}
|
||||
|
||||
@@ -1418,12 +1418,12 @@ class MDB2_Statement_mysql extends MDB2_Statement_Common
|
||||
}
|
||||
}
|
||||
$quoted = $this->db->quote($value, $type);
|
||||
if (PEAR::isError($quoted)) {
|
||||
if (DOLIPEAR::isError($quoted)) {
|
||||
return $quoted;
|
||||
}
|
||||
$param_query = 'SET @'.$parameter.' = '.$quoted;
|
||||
$result = $this->db->_doQuery($param_query, true, $connection);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -1431,7 +1431,7 @@ class MDB2_Statement_mysql extends MDB2_Statement_Common
|
||||
}
|
||||
|
||||
$result = $this->db->_doQuery($query, $this->is_manip, $connection);
|
||||
if (PEAR::isError($result)) {
|
||||
if (DOLIPEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -1465,7 +1465,7 @@ class MDB2_Statement_mysql extends MDB2_Statement_Common
|
||||
|
||||
if (!is_null($this->statement)) {
|
||||
$connection = $this->db->getConnection();
|
||||
if (PEAR::isError($connection)) {
|
||||
if (DOLIPEAR::isError($connection)) {
|
||||
return $connection;
|
||||
}
|
||||
$query = 'DEALLOCATE PREPARE '.$this->statement;
|
||||
|
||||
Reference in New Issue
Block a user