Removed unuseful errors

This commit is contained in:
Marcos García de La Fuente 2014-06-13 01:46:27 +02:00
parent 88cd5dec40
commit 0ed2481a20
4 changed files with 21 additions and 27 deletions

View File

@ -2178,7 +2178,7 @@ class ContratLigne
if (! $sql) return -1;
//print $sql;
dol_syslog(get_class($this)."::get_element_list sql=" . $sql);
dol_syslog(get_class($this)."::get_element_list", LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
{

View File

@ -280,7 +280,6 @@ class Link extends CommonObject
return 0;
}
} else {
dol_syslog(get_class($this) . "::FetchAll fails sql=" . $sql, LOG_ERR);
return -1;
}
}
@ -348,7 +347,7 @@ class Link extends CommonObject
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "links";
$sql.= " WHERE rowid = " . $this->id;
dol_syslog(get_class($this)."::delete sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
if (! $this->db->query($sql))
{
$error++;

View File

@ -182,7 +182,7 @@ class Productcustomerprice extends CommonObject
$this->db->begin();
dol_syslog(get_class($this) . "::create sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this) . "::create", LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) {
$error ++;
@ -258,7 +258,7 @@ class Productcustomerprice extends CommonObject
$sql .= " FROM " . MAIN_DB_PREFIX . "product_customer_price as t";
$sql .= " WHERE t.rowid = " . $id;
dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this) . "::fetch", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
if ($this->db->num_rows($resql)) {
@ -355,7 +355,7 @@ class Productcustomerprice extends CommonObject
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
}
dol_syslog(get_class($this) . "::fetch_all sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this) . "::fetch_all", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
@ -460,7 +460,7 @@ class Productcustomerprice extends CommonObject
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
}
dol_syslog(get_class($this) . "::fetch_all_log sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this) . "::fetch_all_log", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
@ -625,7 +625,7 @@ class Productcustomerprice extends CommonObject
$sql .= " WHERE t.rowid = " . $this->id;
$this->db->begin();
dol_syslog(get_class($this) . "::update sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this) . "::update", LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) {
$error ++;
@ -654,7 +654,7 @@ class Productcustomerprice extends CommonObject
$sql .= " WHERE rowid=" . $this->id;
dol_syslog(get_class($this) . "::update sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this) . "::update", LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) {
$error ++;
@ -713,7 +713,7 @@ class Productcustomerprice extends CommonObject
$sql .= " WHERE s.parent = " . $this->fk_soc;
$sql .= " AND s.entity IN (" . getEntity('societe', 1) . ")";
dol_syslog(get_class($this) . "::setPriceOnAffiliateThirdparty sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this) . "::setPriceOnAffiliateThirdparty", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
@ -821,7 +821,7 @@ class Productcustomerprice extends CommonObject
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "product_customer_price";
$sql .= " WHERE rowid=" . $this->id;
dol_syslog(get_class($this) . "::delete sql=" . $sql);
dol_syslog(get_class($this) . "::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) {
$error ++;

View File

@ -119,7 +119,7 @@ class Project extends CommonObject
$sql.= ", ".$conf->entity;
$sql.= ")";
dol_syslog(get_class($this)."::create sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this)."::create", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@ -144,7 +144,6 @@ class Project extends CommonObject
{
$this->error = $this->db->lasterror();
$this->errno = $this->db->lasterrno();
dol_syslog(get_class($this)."::create error -2 " . $this->error, LOG_ERR);
$error++;
}
@ -209,7 +208,7 @@ class Project extends CommonObject
$sql.= ", datee=" . ($this->date_end != '' ? $this->db->idate($this->date_end) : 'null');
$sql.= " WHERE rowid = " . $this->id;
dol_syslog(get_class($this)."::Update sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this)."::Update", LOG_DEBUG);
if ($this->db->query($sql))
{
if (!$notrigger)
@ -299,7 +298,7 @@ class Project extends CommonObject
$sql.= " AND entity IN (".getEntity('project').")";
}
dol_syslog(get_class($this)."::fetch sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@ -339,7 +338,6 @@ class Project extends CommonObject
else
{
$this->error = $this->db->lasterror();
dol_syslog(get_class($this)."::fetch " . $this->error, LOG_ERR);
return -1;
}
}
@ -403,7 +401,7 @@ class Project extends CommonObject
if (! $sql) return -1;
//print $sql;
dol_syslog(get_class($this)."::get_element_list sql=" . $sql);
dol_syslog(get_class($this)."::get_element_list", LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
{
@ -463,7 +461,7 @@ class Project extends CommonObject
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "projet_task_extrafields";
$sql.= " WHERE fk_object IN (SELECT rowid FROM " . MAIN_DB_PREFIX . "projet_task WHERE fk_projet=" . $this->id . ")";
dol_syslog(get_class($this) . "::delete sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this) . "::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql)
{
@ -474,7 +472,7 @@ class Project extends CommonObject
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "projet_task";
$sql.= " WHERE fk_projet=" . $this->id;
dol_syslog(get_class($this) . "::delete sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this) . "::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql)
{
@ -485,7 +483,7 @@ class Project extends CommonObject
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "projet";
$sql.= " WHERE rowid=" . $this->id;
dol_syslog(get_class($this) . "::delete sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this) . "::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql)
{
@ -497,7 +495,7 @@ class Project extends CommonObject
$sql.= " WHERE fk_object=" . $this->id;
dol_syslog(get_class($this) . "::delete sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this) . "::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql)
{
@ -580,7 +578,7 @@ class Project extends CommonObject
$sql.= " WHERE rowid = " . $this->id;
$sql.= " AND entity = " . $conf->entity;
dol_syslog(get_class($this)."::setValid sql=" . $sql);
dol_syslog(get_class($this)."::setValid", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@ -613,7 +611,6 @@ class Project extends CommonObject
{
$this->db->rollback();
$this->error = $this->db->lasterror();
dol_syslog(get_class($this)."::setValid " . $this->error, LOG_ERR);
return -1;
}
}
@ -641,7 +638,7 @@ class Project extends CommonObject
$sql.= " AND entity = " . $conf->entity;
$sql.= " AND fk_statut = 1";
dol_syslog(get_class($this)."::setClose sql=" . $sql);
dol_syslog(get_class($this)."::setClose", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@ -674,7 +671,6 @@ class Project extends CommonObject
{
$this->db->rollback();
$this->error = $this->db->lasterror();
dol_syslog(get_class($this)."::setClose " . $this->error, LOG_ERR);
return -1;
}
}
@ -1306,11 +1302,10 @@ class Project extends CommonObject
$sql.= " WHERE rowid=".$ElementSelectId;
}
dol_syslog(get_class($this)."::update_element sql=" . $sql, LOG_DEBUG);
dol_syslog(get_class($this)."::update_element", LOG_DEBUG);
$resql=$this->db->query($sql);
if (!$resql) {
$this->error=$this->db->lasterror();
dol_syslog(get_class($this)."::update_element error : " . $this->error, LOG_ERR);
return -1;
}else {
return 1;