Removed SQL string from call debug log

This commit is contained in:
Marcos García de La Fuente
2014-06-13 01:34:39 +02:00
parent 7e7958cf73
commit ca0a6cb307
45 changed files with 90 additions and 101 deletions

View File

@@ -158,7 +158,7 @@ class Categorie extends CommonObject
$this->db->begin();
dol_syslog(get_class($this).'::create sql='.$sql);
dol_syslog(get_class($this).'::create', LOG_DEBUG);
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie (";
$sql.= "fk_parent,";
$sql.= " label,";
@@ -472,7 +472,7 @@ class Categorie extends CommonObject
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_".$type." (fk_categorie, fk_".$column_name.")";
$sql .= " VALUES (".$this->id.", ".$obj->id.")";
dol_syslog(get_class($this).'::add_type sql='.$sql);
dol_syslog(get_class($this).'::add_type', LOG_DEBUG);
if ($this->db->query($sql))
{
if (! empty($conf->global->CATEGORIE_RECURSIV_ADD))
@@ -567,7 +567,7 @@ class Categorie extends CommonObject
$sql .= " WHERE fk_categorie = ".$this->id;
$sql .= " AND fk_".$column_name." = ".$obj->id;
dol_syslog(get_class($this).'::del_type sql='.$sql);
dol_syslog(get_class($this).'::del_type', LOG_DEBUG);
if ($this->db->query($sql))
{
// Save object we want to unlink category off into category instance to provide information to trigger
@@ -1136,7 +1136,7 @@ class Categorie extends CommonObject
$sql.= " WHERE ct.fk_categorie = c.rowid AND ct.fk_".$table." = ".$id." AND c.type = ".$typeid;
$sql.= " AND c.entity IN (".getEntity('category',1).")";
dol_syslog(get_class($this).'::containing sql='.$sql);
dol_syslog(get_class($this).'::containing', LOG_DEBUG);
$res = $this->db->query($sql);
if ($res)
{

View File

@@ -149,7 +149,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($conf->liste_limit +1, $offset);
dol_syslog('comm/list.php: sql='.$sql,LOG_DEBUG);
dol_syslog('comm/list.php:', LOG_DEBUG);
$result = $db->query($sql);
if ($result)
{

View File

@@ -1327,7 +1327,7 @@ class Propal extends CommonObject
$sql.= " fk_statut = 1, date_valid='".$this->db->idate($now)."', fk_user_valid=".$user->id;
$sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0";
dol_syslog(get_class($this).'::valid sql='.$sql);
dol_syslog(get_class($this).'::valid', LOG_DEBUG);
if ($this->db->query($sql))
{
if (! $notrigger)
@@ -2633,7 +2633,7 @@ class Propal extends CommonObject
$sql.= ' WHERE pt.fk_propal = '.$this->id;
$sql.= ' ORDER BY pt.rang ASC, pt.rowid';
dol_syslog(get_class($this).'::getLinesArray sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this).'::getLinesArray', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -2921,7 +2921,7 @@ class PropaleLigne extends CommonObject
$sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null");
$sql.= ')';
dol_syslog(get_class($this).'::insert sql='.$sql, LOG_DEBUG);
dol_syslog(get_class($this).'::insert', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{

View File

@@ -233,7 +233,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$sql.= " ORDER BY $sortfield $sortorder, s.nom ASC";
$sql.= $db->plimit($conf->liste_limit+1, $offset);
dol_syslog('comm/prospect/list.php sql='.$sql,LOG_DEBUG);
dol_syslog('comm/prospect/list.php', LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -145,7 +145,7 @@ $sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit+1,$offset);
//print $sql;
dol_syslog('compta/bank/search.php:: sql='.$sql);
dol_syslog('compta/bank/search.php::', LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -415,7 +415,7 @@ class Deplacement extends CommonObject
$sql.= ' FROM '.MAIN_DB_PREFIX.'deplacement as c';
$sql.= ' WHERE c.rowid = '.$id;
dol_syslog(get_class($this).'::info sql='.$sql);
dol_syslog(get_class($this).'::info', LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)

View File

@@ -955,7 +955,7 @@ class Facture extends CommonInvoice
$sql.= ' WHERE l.fk_facture = '.$this->id;
$sql.= ' ORDER BY l.rang';
dol_syslog(get_class($this).'::fetch_lines sql='.$sql, LOG_DEBUG);
dol_syslog(get_class($this).'::fetch_lines', LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
{

View File

@@ -177,7 +177,7 @@ class Paiement extends CommonObject
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiement_facture (fk_facture, fk_paiement, amount)';
$sql .= ' VALUES ('.$facid.', '. $this->id.', \''.$amount.'\')';
dol_syslog(get_class($this).'::Create Amount line '.$key.' insert paiement_facture sql='.$sql);
dol_syslog(get_class($this).'::Create Amount line '.$key.' insert paiement_facture', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -553,7 +553,7 @@ class Paiement extends CommonObject
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' set fk_bank = '.$id_bank;
$sql.= ' WHERE rowid = '.$this->id;
dol_syslog(get_class($this).'::update_fk_bank sql='.$sql);
dol_syslog(get_class($this).'::update_fk_bank', LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
{
@@ -639,7 +639,7 @@ class Paiement extends CommonObject
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET statut = 1 WHERE rowid = '.$this->id;
dol_syslog(get_class($this).'::valide sql='.$sql);
dol_syslog(get_class($this).'::valide', LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
{
@@ -663,7 +663,7 @@ class Paiement extends CommonObject
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiement as p';
$sql.= ' WHERE p.rowid = '.$id;
dol_syslog(get_class($this).'::info sql='.$sql);
dol_syslog(get_class($this).'::info', LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
@@ -726,7 +726,7 @@ class Paiement extends CommonObject
else
{
$this->error=$this->db->error();
dol_syslog(get_class($this).'::getBillsArray Error '.$this->error.' - sql='.$sql);
dol_syslog(get_class($this).'::getBillsArray Error '.$this->error.' -', LOG_DEBUG);
return -1;
}
}

View File

@@ -79,7 +79,7 @@ class box_ficheinter extends ModeleBoxes
$sql.= " ORDER BY f.tms DESC";
$sql.= $db->plimit($max, 0);
dol_syslog(get_class($this).'::loadBox sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this).'::loadBox', LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -653,7 +653,7 @@ abstract class CommonObject
$sql = "SELECT rowid, code, libelle as label, coder";
$sql.= " FROM ".MAIN_DB_PREFIX."c_barcode_type";
$sql.= " WHERE rowid = ".$idtype;
dol_syslog(get_class($this).'::fetch_barcode sql='.$sql);
dol_syslog(get_class($this).'::fetch_barcode', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -739,7 +739,7 @@ abstract class CommonObject
$sql.= " WHERE ".$field." = '".$key."'";
$sql.= " AND entity = ".$conf->entity;
dol_syslog(get_class($this).'::fetchObjectFrom sql='.$sql);
dol_syslog(get_class($this).'::fetchObjectFrom', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -765,7 +765,7 @@ abstract class CommonObject
$sql = "SELECT ".$field." FROM ".MAIN_DB_PREFIX.$table;
$sql.= " WHERE rowid = ".$id;
dol_syslog(get_class($this).'::getValueFrom sql='.$sql);
dol_syslog(get_class($this).'::getValueFrom', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -2484,7 +2484,7 @@ abstract class CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element."det";
$sql.= " WHERE ".$this->fk_element." = ".$this->id;
dol_syslog(get_class($this).'::getTotalDiscount sql='.$sql);
dol_syslog(get_class($this).'::getTotalDiscount', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{

View File

@@ -399,7 +399,7 @@ class ExtraFields
{
$sql="ALTER TABLE ".MAIN_DB_PREFIX.$table." DROP INDEX uk_".$table."_".$attrname;
}
dol_syslog(get_class($this).'::update sql='.$sql);
dol_syslog(get_class($this).'::update', LOG_DEBUG);
$resql=$this->db->query($sql,1,'dml');
return 1;
}
@@ -754,7 +754,7 @@ class ExtraFields
$sql.=preg_replace('/^ AND /','',$sqlwhere);
//print $sql;
dol_syslog(get_class($this).'::showInputField type=sellist sql='.$sql);
dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -964,7 +964,7 @@ class ExtraFields
$sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
//$sql.= ' AND entity = '.$conf->entity;
dol_syslog(get_class($this).':showOutputField:$type=sellist sql='.$sql);
dol_syslog(get_class($this).':showOutputField:$type=sellist', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{

View File

@@ -604,7 +604,7 @@ class Form
$sql.= " FROM ".MAIN_DB_PREFIX."c_type_fees as c";
$sql.= " ORDER BY lower(c.libelle) ASC";
dol_syslog(get_class($this).'::load_cache_types_fees sql='.$sql, LOG_DEBUG);
dol_syslog(get_class($this).'::load_cache_types_fees', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -1554,7 +1554,7 @@ class Form
$sql.= " ORDER BY date_price";
$sql.= " DESC LIMIT 1";
dol_syslog(get_class($this).'::constructProductListOption search price for level '.$price_level.' sql='.$sql);
dol_syslog(get_class($this).'::constructProductListOption search price for level '.$price_level.'', LOG_DEBUG);
$result2 = $this->db->query($sql);
if ($result2)
{
@@ -2055,7 +2055,7 @@ class Form
$sql.= " FROM ".MAIN_DB_PREFIX.'c_payment_term';
$sql.= " WHERE active=1";
$sql.= " ORDER BY sortorder";
dol_syslog(get_class($this).'::load_cache_conditions_paiements sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this).'::load_cache_conditions_paiements', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -2094,7 +2094,7 @@ class Form
$sql.= " FROM ".MAIN_DB_PREFIX.'c_availability';
$sql.= " WHERE active=1";
$sql.= " ORDER BY rowid";
dol_syslog(get_class($this).'::load_cache_availability sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this).'::load_cache_availability', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{

View File

@@ -65,7 +65,7 @@ class FormCompany
$sql.= " WHERE active = 1";
if ($filter) $sql.=" ".$filter;
$sql.= " ORDER by id";
dol_syslog(get_class($this).'::typent_array sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this).'::typent_array', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -104,7 +104,7 @@ class FormCompany
$sql.= " WHERE active = 1";
if ($filter) $sql.=" ".$filter;
$sql .= " ORDER BY id ASC";
dol_syslog(get_class($this).'::effectif_array sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this).'::effectif_array', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{

View File

@@ -169,7 +169,7 @@ class FormOther
$sql.= " WHERE e.active = 1 AND e.fk_pays = p.rowid";
$sql.= " ORDER BY pays, e.organization ASC, e.code ASC";
dol_syslog(get_class($this).'::select_ecotaxes sql='.$sql);
dol_syslog(get_class($this).'::select_ecotaxes', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -227,7 +227,7 @@ class FormOther
$sql.= " WHERE r.active = 1 AND r.fk_pays = p.rowid";
$sql.= " AND p.code = '".$country_code."'";
dol_syslog(get_class($this).'::select_revenue_stamp sql='.$sql);
dol_syslog(get_class($this).'::select_revenue_stamp', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{

View File

@@ -197,7 +197,7 @@ class FormProjets
$sql.= ' AND entity='.$conf->entity;
$sql.= " ORDER BY ref DESC";
dol_syslog(get_class($this).'::select_element sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this).'::select_element', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)

View File

@@ -674,7 +674,7 @@ class Translate
$sql = "SELECT ".$fieldlabel." as label";
$sql.= " FROM ".MAIN_DB_PREFIX.$tablename;
$sql.= " WHERE ".$fieldkey." = '".($keyforselect?$keyforselect:$key)."'";
dol_syslog(get_class($this).'::getLabelFromKey sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this).'::getLabelFromKey', LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{
@@ -754,7 +754,7 @@ class Translate
if (! empty($currency_code)) $sql.=" AND code_iso = '".$currency_code."'";
//$sql.= " ORDER BY code_iso ASC"; // Not required, a sort is done later
dol_syslog(get_class($this).'::loadCacheCurrencies sql='.$sql, LOG_DEBUG);
dol_syslog(get_class($this).'::loadCacheCurrencies', LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -372,7 +372,8 @@ class DoliDBMssql extends DoliDB
$this->lastqueryerror = $query;
$this->lasterror = $this->error();
$this->lasterrno = $row["code"];
dol_syslog(get_class($this)."::query SQL error: ".$query, LOG_ERROR);
dol_syslog(get_class($this)."::query SQL error: ".$this->lasterror." (".$this->lasterrno.")", LOG_ERROR);
}
$this->lastquery=$query;
$this->_results = $ret;

View File

@@ -273,7 +273,9 @@ class DoliDBMysql extends DoliDB
$this->lastqueryerror = $query;
$this->lasterror = $this->error();
$this->lasterrno = $this->errno();
dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_ERROR);
dol_syslog(get_class($this)."::query SQL Error query: ".$query, LOG_ERROR);
dol_syslog(get_class($this)."::query SQL Error message: ".$this->lasterror." (".$this->lasterrno.")", LOG_ERROR);
}
$this->lastquery=$query;
$this->_results = $ret;
@@ -829,21 +831,14 @@ class DoliDBMysql extends DoliDB
{
if ($this->lasterrno != 'DB_ERROR_USER_ALREADY_EXISTS')
{
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
return -1;
}
else
{
// If user already exists, we continue to set permissions
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_WARNING);
}
}
$sql = "GRANT ALL PRIVILEGES ON ".$this->escape($dolibarr_main_db_name).".* TO '".$this->escape($dolibarr_main_db_user)."'@'".$this->escape($dolibarr_main_db_host)."' IDENTIFIED BY '".$this->escape($dolibarr_main_db_pass)."'";
dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
$resql=$this->query($sql);
if (! $resql)
{
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
return -1;
}
@@ -853,7 +848,6 @@ class DoliDBMysql extends DoliDB
$resql=$this->query($sql);
if (! $resql)
{
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
return -1;
}

View File

@@ -275,7 +275,8 @@ class DoliDBMysqli extends DoliDB
$this->lastqueryerror = $query;
$this->lasterror = $this->error();
$this->lasterrno = $this->errno();
dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_ERROR);
dol_syslog(get_class($this)."::query SQL error: ".$this->lasterror." (".$this->lasterrno.")", LOG_ERROR);
}
$this->lastquery=$query;
$this->_results = $ret;
@@ -833,21 +834,14 @@ class DoliDBMysqli extends DoliDB
{
if ($this->lasterrno != 'DB_ERROR_USER_ALREADY_EXISTS')
{
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
return -1;
}
else
{
// If user already exists, we continue to set permissions
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_WARNING);
}
}
$sql = "GRANT ALL PRIVILEGES ON ".$this->escape($dolibarr_main_db_name).".* TO '".$this->escape($dolibarr_main_db_user)."'@'".$this->escape($dolibarr_main_db_host)."' IDENTIFIED BY '".$this->escape($dolibarr_main_db_pass)."'";
dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
$resql=$this->query($sql);
if (! $resql)
{
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
return -1;
}
@@ -857,7 +851,6 @@ class DoliDBMysqli extends DoliDB
$resql=$this->query($sql);
if (! $resql)
{
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
return -1;
}

View File

@@ -506,9 +506,7 @@ class DoliDBPgsql extends DoliDB
$this->lasterror = $this->error();
$this->lasterrno = $this->errno();
}
dol_syslog(get_class($this)."::query SQL error usesavepoint = ".$usesavepoint." - ".$query." - ".pg_last_error($this->db)." => ".$this->errno(), LOG_ERROR);
//print "\n>> ".$query."<br>\n";
//print '>> '.$this->lasterrno.' - '.$this->lasterror.' - '.$this->lastqueryerror."<br>\n";
dol_syslog(get_class($this)."::query SQL error usesavepoint = ".$usesavepoint." - ".$this->lasterror." (".$this->lasterrno.")", LOG_ERROR);
if ($usesavepoint && $this->transaction_opened) // Warning, after that errno will be erased
{

View File

@@ -409,8 +409,14 @@ class DoliDBSqlite extends DoliDB
$this->lastqueryerror = $query;
$this->lasterror = $this->error();
$this->lasterrno = $this->errno();
if (preg_match('/[0-9]/',$this->lasterrno)) dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno." ".$this->lasterror, LOG_ERROR);
else dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_ERROR);
$errormsg = get_class($this)."::query SQL error: ".$this->lasterror;
if (preg_match('/[0-9]/',$this->lasterrno)) {
$errormsg .= ' ('.$this->lasterrno.')';
}
dol_syslog($errormsg, LOG_ERROR);
}
$this->lastquery=$query;
$this->_results = $ret;
@@ -972,7 +978,6 @@ class DoliDBSqlite extends DoliDB
$resql=$this->query($sql);
if (! $resql)
{
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
return -1;
}
@@ -985,7 +990,6 @@ class DoliDBSqlite extends DoliDB
$resql=$this->query($sql);
if (! $resql)
{
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
return -1;
}
@@ -995,7 +999,6 @@ class DoliDBSqlite extends DoliDB
$resql=$this->query($sql);
if (! $resql)
{
dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_ERR);
return -1;
}

View File

@@ -655,7 +655,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
if ($search_name) $sql .= " AND (p.lastname LIKE '%".$db->escape($search_name)."%' OR p.firstname LIKE '%".$db->escape($search_name)."%')";
$sql.= " ORDER BY $sortfield $sortorder";
dol_syslog('core/lib/company.lib.php :: show_contacts sql='.$sql,LOG_DEBUG);
dol_syslog('core/lib/company.lib.php :: show_contacts', LOG_DEBUG);
$result = $db->query($sql);
$num = $db->num_rows($result);

View File

@@ -4197,7 +4197,7 @@ function dol_getIdFromCode($db,$key,$tablename,$fieldkey='code',$fieldid='id')
$sql = "SELECT ".$fieldid." as id";
$sql.= " FROM ".MAIN_DB_PREFIX.$tablename;
$sql.= " WHERE ".$fieldkey." = '".$key."'";
dol_syslog('dol_getIdFromCode sql='.$sql, LOG_DEBUG);
dol_syslog('dol_getIdFromCode', LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -1293,7 +1293,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
$sql.= " WHERE type = '".$type."'";
$sql.= " AND entity IN (0,".(! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
dol_syslog('/core/lib/function2.lib.php::getListOfModels sql='.$sql, LOG_DEBUG);
dol_syslog('/core/lib/function2.lib.php::getListOfModels', LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -302,7 +302,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
$sql .= " WHERE p.fk_soc = ".$object->id;
dol_syslog('doc_generic_odt :: sql='.$sql,LOG_DEBUG);
dol_syslog('doc_generic_odt ::', LOG_DEBUG);
$result = $this->db->query($sql);
$num = $this->db->num_rows($result);

View File

@@ -201,7 +201,7 @@ class ProductFournisseur extends Product
$sql.= " WHERE rowid = ".$this->product_fourn_price_id;
// TODO Add price_base_type and price_ttc
dol_syslog(get_class($this).'::update_buyprice sql='.$sql);
dol_syslog(get_class($this).'::update_buyprice', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -238,7 +238,7 @@ class ProductFournisseur extends Product
// Delete price for this quantity
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price";
$sql.= " WHERE fk_soc = ".$fourn->id." AND ref_fourn = '".$this->db->escape($ref_fourn)."' AND quantity = ".$qty." AND entity = ".$conf->entity;
dol_syslog(get_class($this).'::update_buyprice sql='.$sql);
dol_syslog(get_class($this).'::update_buyprice', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{

View File

@@ -382,7 +382,7 @@ class PaiementFourn extends Paiement
$sql.= ' WHERE pf.fk_facturefourn = f.rowid AND fk_paiementfourn = '.$this->id;
if ($filter) $sql.= ' AND '.$filter;
dol_syslog(get_class($this).'::getBillsArray sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this).'::getBillsArray', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{

View File

@@ -118,7 +118,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($conf->liste_limit+1, $offset);
dol_syslog('fourn/liste.php: sql='.$sql,LOG_DEBUG);
dol_syslog('fourn/liste.php:', LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -834,7 +834,7 @@ class Holiday extends CommonObject
$sql.= " value = '".$value."'";
$sql.= " WHERE name = '".$name."'";
dol_syslog(get_class($this).'::updateConfCP name='.$name.' sql='.$sql);
dol_syslog(get_class($this).'::updateConfCP name='.$name.'', LOG_DEBUG);
$result = $this->db->query($sql);
if($result) {
return true;
@@ -855,7 +855,7 @@ class Holiday extends CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_config";
$sql.= " WHERE name = '".$name."'";
dol_syslog(get_class($this).'::getConfCP name='.$name.' sql='.$sql);
dol_syslog(get_class($this).'::getConfCP name='.$name.'', LOG_DEBUG);
$result = $this->db->query($sql);
// Si pas d'erreur
@@ -903,7 +903,7 @@ class Holiday extends CommonObject
$sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'";
$sql.= " WHERE name = 'lastUpdate'";
dol_syslog(get_class($this).'::updateSoldeCP sql='.$sql);
dol_syslog(get_class($this).'::updateSoldeCP', LOG_DEBUG);
$result = $this->db->query($sql);
// On ajoute x jours à chaque utilisateurs
@@ -948,7 +948,7 @@ class Holiday extends CommonObject
$sql.= " nb_holiday = ".$nbHoliday;
$sql.= " WHERE fk_user = '".$userID."'";
dol_syslog(get_class($this).'::updateSoldeCP sql='.$sql);
dol_syslog(get_class($this).'::updateSoldeCP', LOG_DEBUG);
$result = $this->db->query($sql);
if ($result) return 1;
@@ -1040,7 +1040,7 @@ class Holiday extends CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_users";
$sql.= " WHERE fk_user = '".$user_id."'";
dol_syslog(get_class($this).'::getCPforUser sql='.$sql);
dol_syslog(get_class($this).'::getCPforUser', LOG_DEBUG);
$result = $this->db->query($sql);
if($result) {
$obj = $this->db->fetch_object($result);

View File

@@ -81,7 +81,7 @@ if ($action == 'update' && isset($_POST['update_cp']))
$sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET";
$sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'";
$sql.= " WHERE name = 'lastUpdate' and value IS NULL"; // Add value IS NULL to be sure to update only at init.
dol_syslog('define_holiday update lastUpdate entry sql='.$sql);
dol_syslog('define_holiday update lastUpdate entry', LOG_DEBUG);
$result = $db->query($sql);
$mesg='<div class="ok">'.$langs->trans('UpdateConfCPOK').'</div>';

View File

@@ -144,7 +144,7 @@ $sql.=$db->order($sortfield,$sortorder);
// TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
dol_syslog('margin::agentMargins.php sql='.$sql,LOG_DEBUG);
dol_syslog('margin::agentMargins.php', LOG_DEBUG);
$result = $db->query($sql);
if ($result)
{

View File

@@ -188,7 +188,7 @@ $sql.=$db->order($sortfield,$sortorder);
// TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
dol_syslog('margin::customerMargins.php sql='.$sql,LOG_DEBUG);
dol_syslog('margin::customerMargins.php', LOG_DEBUG);
$result = $db->query($sql);
if ($result)
{

View File

@@ -193,7 +193,7 @@ $sql.=$db->order($sortfield,$sortorder);
// TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
dol_syslog('margin::productMargins.php sql='.$sql,LOG_DEBUG);
dol_syslog('margin::productMargins.php', LOG_DEBUG);
$result = $db->query($sql);
if ($result)
{

View File

@@ -154,7 +154,7 @@ if ($id > 0 || ! empty($ref))
$sql.= " ORDER BY ".$sortfield." ".$sortorder;
// TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
dol_syslog('margin:tabs:productMargins.php sql='.$sql,LOG_DEBUG);
dol_syslog('margin:tabs:productMargins.php', LOG_DEBUG);
$result = $db->query($sql);
if ($result)
{

View File

@@ -147,7 +147,7 @@ if ($socid > 0)
// TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
dol_syslog('margin:tabs:thirdpartyMargins.php sql='.$sql,LOG_DEBUG);
dol_syslog('margin:tabs:thirdpartyMargins.php', LOG_DEBUG);
$result = $db->query($sql);
if ($result)
{

View File

@@ -76,7 +76,7 @@ class FormProduct
$sql.= " AND e.statut = 1";
$sql.= " ORDER BY e.label";
dol_syslog(get_class($this).'::loadWarehouses sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this).'::loadWarehouses', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{

View File

@@ -779,7 +779,7 @@ class Product extends CommonObject
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX.$table;
$sql.= " WHERE fk_product = ".$id;
dol_syslog(get_class($this).'::delete sql='.$sql, LOG_DEBUG);
dol_syslog(get_class($this).'::delete', LOG_DEBUG);
$result = $this->db->query($sql);
if (! $result)
{
@@ -2078,7 +2078,7 @@ class Product extends CommonObject
$sql.= " WHERE fk_product_pere = ".$fk_parent;
$sql.= " AND fk_product_fils = ".$fk_child;
dol_syslog(get_class($this).'::del_sousproduit sql='.$sql);
dol_syslog(get_class($this).'::del_sousproduit', LOG_DEBUG);
if (! $this->db->query($sql))
{
dol_print_error($this->db);
@@ -2283,7 +2283,7 @@ class Product extends CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX."product_price ";
$sql.= " WHERE fk_product = ". $fromId;
dol_syslog(get_class($this).'::clone_price sql='.$sql);
dol_syslog(get_class($this).'::clone_price', LOG_DEBUG);
if (! $this->db->query($sql))
{
$this->db->rollback();
@@ -2308,7 +2308,7 @@ class Product extends CommonObject
$sql.= " SELECT null, $toId, fk_product_fils, qty FROM ".MAIN_DB_PREFIX."product_association";
$sql.= " WHERE fk_product_pere = '".$fromId."'";
dol_syslog(get_class($this).'::clone_association sql='.$sql);
dol_syslog(get_class($this).'::clone_association', LOG_DEBUG);
if (! $this->db->query($sql))
{
$this->db->rollback();
@@ -2352,7 +2352,7 @@ class Product extends CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price";
$sql.= " WHERE fk_product = ".$fromId;
dol_syslog(get_class($this).'::clone_fournisseurs sql='.$sql);
dol_syslog(get_class($this).'::clone_fournisseurs', LOG_DEBUG);
$resql=$this->db->query($sql);
if (! $resql)
{
@@ -2562,7 +2562,7 @@ class Product extends CommonObject
$sql.= " AND pa.fk_product_pere = ".$id;
$sql.= " AND pa.fk_product_fils != ".$id; // This should not happens, it is to avoid infinite loop if it happens
dol_syslog(get_class($this).'::getChildsArbo sql='.$sql);
dol_syslog(get_class($this).'::getChildsArbo', LOG_DEBUG);
$res = $this->db->query($sql);
if ($res)
{

View File

@@ -412,7 +412,7 @@ class MouvementStock
$sql.= ' WHERE fk_product = '.$productidselected;
$sql.= " AND datem < '".$this->db->idate($datebefore)."'";
dol_syslog(get_class($this).__METHOD__.' sql='.$sql);
dol_syslog(get_class($this).__METHOD__.'', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{

View File

@@ -390,7 +390,7 @@ else
$sql.= " AND ps.fk_entrepot = ".$object->id;
$sql.= $db->order($sortfield,$sortorder);
dol_syslog('List products sql='.$sql);
dol_syslog('List products', LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -250,7 +250,7 @@ if ($salert == 'on') // Option to see when stock is lower than alert
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit + 1, $offset);
dol_syslog('Execute request sql='.$sql);
dol_syslog('Execute request', LOG_DEBUG);
$resql = $db->query($sql);
if (empty($resql))
{

View File

@@ -155,7 +155,7 @@ $sql.= " ORDER BY u.rowid, t.dateo, t.datee";
$userstatic=new User($db);
dol_syslog('projet:index.php: affectationpercent sql='.$sql,LOG_DEBUG);
dol_syslog('projet:index.php: affectationpercent', LOG_DEBUG);
$resql = $db->query($sql);
if ( $resql )
{

View File

@@ -380,7 +380,7 @@ class Address
}
else
{
dol_syslog('Erreur Societe::Fetch echec sql='.$sql);
dol_syslog('Erreur Societe::Fetch echec', LOG_DEBUG);
dol_syslog('Erreur Societe::Fetch '.$this->db->error());
$this->error=$this->db->error();
$result = -3;

View File

@@ -2272,7 +2272,7 @@ class Societe extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."societe";
$sql.= " SET parent = ".($id > 0 ? $id : "null");
$sql.= " WHERE rowid = " . $this->id;
dol_syslog(get_class($this).'::set_parent sql='.$sql);
dol_syslog(get_class($this).'::set_parent', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{

View File

@@ -260,7 +260,7 @@ class User extends CommonObject
$sql = "SELECT param, value FROM ".MAIN_DB_PREFIX."user_param";
$sql.= " WHERE fk_user = ".$this->id;
$sql.= " AND entity = ".$conf->entity;
//dol_syslog(get_class($this).'::fetch load personalized conf sql='.$sql, LOG_DEBUG);
//dol_syslog(get_class($this).'::fetch load personalized conf', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -536,7 +536,7 @@ class User extends CommonObject
$sql.= " AND r.perms IS NOT NULL";
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
dol_syslog(get_class($this).'::getrights sql='.$sql, LOG_DEBUG);
dol_syslog(get_class($this).'::getrights', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -586,7 +586,7 @@ class User extends CommonObject
$sql.= " AND r.perms IS NOT NULL";
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
dol_syslog(get_class($this).'::getrights sql='.$sql, LOG_DEBUG);
dol_syslog(get_class($this).'::getrights', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -1616,7 +1616,7 @@ class User extends CommonObject
$sql = "DELETE FROM ".MAIN_DB_PREFIX."user_clicktodial";
$sql .= " WHERE fk_user = ".$this->id;
dol_syslog(get_class($this).'::update_clicktodial sql='.$sql);
dol_syslog(get_class($this).'::update_clicktodial', LOG_DEBUG);
$result = $this->db->query($sql);
$sql = "INSERT INTO ".MAIN_DB_PREFIX."user_clicktodial";
@@ -1627,7 +1627,7 @@ class User extends CommonObject
$sql .= ", '". $this->db->escape($this->clicktodial_password) ."'";
$sql .= ", '". $this->db->escape($this->clicktodial_poste) ."')";
dol_syslog(get_class($this).'::update_clicktodial sql='.$sql);
dol_syslog(get_class($this).'::update_clicktodial', LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
{

View File

@@ -471,7 +471,7 @@ class UserGroup extends CommonObject
$sql.= " AND r.perms IS NOT NULL";
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
dol_syslog(get_class($this).'::getrights sql='.$sql, LOG_DEBUG);
dol_syslog(get_class($this).'::getrights', LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{