diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index ff1abc8199c..e436fd5f694 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -454,8 +454,8 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ // Update fk_bank into subscription table $sql = 'UPDATE '.MAIN_DB_PREFIX.'cotisation SET fk_bank='.$bank_line_id; $sql.= ' WHERE rowid='.$crowid; - dol_syslog('sql='.$sql); - $result = $db->query($sql); + + $result = $db->query($sql); if (! $result) { $error++; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index aafe6d11d8a..27dd65e6217 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1594,7 +1594,6 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dol_syslog(get_class($this)."::set_remise_percent Error sql=$sql"); return -1; } } @@ -1629,7 +1628,6 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dol_syslog(get_class($this)."::set_remise_absolue Error sql=$sql"); return -1; } } @@ -3131,7 +3129,7 @@ class PropaleLigne extends CommonObject $sql.= ",total_ttc=".price2num($this->total_ttc,'MT').""; $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog("PropaleLigne::update_total sql=$sql"); + dol_syslog("PropaleLigne::update_total", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 2d06fc135f3..a48dd0b9b43 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1888,7 +1888,7 @@ class Commande extends CommonOrder $sql.= ' SET remise_absolue = '.$remise; $sql.= ' WHERE rowid = '.$this->id.' AND fk_statut = 0 ;'; - dol_syslog(get_class($this)."::set_remise_absolue sql=$sql"); + dol_syslog(get_class($this)."::set_remise_absolue", LOG_DEBUG); if ($this->db->query($sql)) { @@ -1920,7 +1920,7 @@ class Commande extends CommonOrder $sql.= " SET date_commande = ".($date ? $this->db->idate($date) : 'null'); $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0"; - dol_syslog(get_class($this)."::set_date sql=$sql",LOG_DEBUG); + dol_syslog(get_class($this)."::set_date",LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -3485,7 +3485,7 @@ class OrderLine extends CommonOrderLine $sql.= ",total_ttc='".price2num($this->total_ttc)."'"; $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog("OrderLine::update_total sql=$sql"); + dol_syslog("OrderLine::update_total", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 8729c44e494..e50c7bb34f6 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -569,7 +569,7 @@ class Account extends CommonObject $sql.= " WHERE rowid = ".$this->id; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::update_bban sql=$sql"); + dol_syslog(get_class($this)."::update_bban", LOG_DEBUG); $result = $this->db->query($sql); if ($result) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index f08a2af3feb..477735ca9ec 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2346,7 +2346,7 @@ class Facture extends CommonInvoice $sql.= ' WHERE rowid = '.$this->id; $sql.= ' AND fk_statut = 0'; - dol_syslog(get_class($this)."::set_remise_absolue sql=$sql"); + dol_syslog(get_class($this)."::set_remise_absolue", LOG_DEBUG); if ($this->db->query($sql)) { @@ -2737,7 +2737,7 @@ class Facture extends CommonInvoice if ($socid > 0) $sql.=" AND f.fk_soc = ".$socid; $sql.= " ORDER BY f.facnumber"; - dol_syslog(get_class($this)."::list_replacable_invoices sql=$sql"); + dol_syslog(get_class($this)."::list_replacable_invoices", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 990238cf543..39b8f209247 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -704,7 +704,7 @@ class RemiseCheque extends CommonObject $sql.= " SET date_bordereau = ".($date ? $this->db->idate($date) : 'null'); $sql.= " WHERE rowid = ".$this->id; - dol_syslog("RemiseCheque::set_date sql=$sql",LOG_DEBUG); + dol_syslog("RemiseCheque::set_date", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -738,7 +738,7 @@ class RemiseCheque extends CommonObject $sql.= " SET number = '".$number."'" ; $sql.= " WHERE rowid = ".$this->id; - dol_syslog("RemiseCheque::set_number sql=$sql",LOG_DEBUG); + dol_syslog("RemiseCheque::set_number", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 049825578e7..8217749f260 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1075,7 +1075,6 @@ class Contrat extends CommonObject } else { - dol_syslog("Error sql=$sql, error=".$this->error,LOG_ERR); $this->db->rollback(); return -1; } diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index fa08ef5566a..fdc4a35a585 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -308,7 +308,7 @@ abstract class CommonInvoice extends CommonObject if (is_numeric($cond_reglement)) $sqltemp.= " WHERE c.rowid=".$cond_reglement; else $sqltemp.= " WHERE c.code='".$this->db->escape($cond_reglement)."'"; - dol_syslog(get_class($this).'::calculate_date_lim_reglement sql='.$sqltemp); + dol_syslog(get_class($this).'::calculate_date_lim_reglement', LOG_DEBUG); $resqltemp=$this->db->query($sqltemp); if ($resqltemp) { diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index e6a9e139109..4e9598d5e20 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -837,7 +837,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m if ($sqlwhere) $maskrefclient_sql.=' AND '.$sqlwhere; //use the same sqlwhere as general mask $maskrefclient_sql.=' AND (SUBSTRING('.$field.', '.(strpos($maskwithnocode,$maskrefclient)+1).', '.dol_strlen($maskrefclient_maskclientcode).")='".$maskrefclient_clientcode."')"; - dol_syslog("functions2::get_next_value maskrefclient_sql=".$maskrefclient_sql, LOG_DEBUG); + dol_syslog("functions2::get_next_value maskrefclient", LOG_DEBUG); $maskrefclient_resql=$db->query($maskrefclient_sql); if ($maskrefclient_resql) { diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 83681a3a4b9..8637364f578 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -145,7 +145,7 @@ class CommandeFournisseur extends CommonOrder $obj = $this->db->fetch_object($resql); if (! $obj) { - $this->error='Bill with id '.$id.' not found sql='.$sql; + $this->error='Bill with id '.$id.' not found'; dol_syslog(get_class($this).'::fetch '.$this->error); return 0; } @@ -2140,7 +2140,7 @@ class CommandeFournisseurLigne $sql.= ",total_ttc='".price2num($this->total_ttc)."'"; $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog("CommandeFournisseurLigne.class.php::update_total sql=$sql"); + dol_syslog("CommandeFournisseurLigne.class.php::update_total", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 95aaeb16eea..a224f1fafb0 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -420,7 +420,7 @@ class FactureFournisseur extends CommonInvoice } else { - $this->error='Bill with id '.$id.' not found sql='.$sql; + $this->error='Bill with id '.$id.' not found'; dol_syslog(get_class($this).'::fetch '.$this->error); return 0; } diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index f970df5bc4d..c85a62ae61a 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -392,7 +392,6 @@ $compteur = 0; $sql ="SELECT id_users, nom, id_sondage, reponses"; $sql.=" FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; $sql.=" WHERE id_sondage = '".$db->escape($numsondage)."'"; -dol_syslog('sql='.$sql); $resql=$db->query($sql); if (! $resql) { diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 2d93dfd5de4..7dbdac8c2bc 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -286,7 +286,6 @@ for ($i = 0; $i < $nblignes; $i++) $sql ="SELECT id_users, nom, id_sondage, reponses"; $sql.=" FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; $sql.=" WHERE id_sondage = '".$db->escape($numsondage)."'"; - dol_syslog('sql='.$sql); $resql=$db->query($sql); if (! $resql) dol_print_error($db); $num=$db->num_rows($resql); diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index c00701fbdbb..0d4c884abf8 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -945,7 +945,7 @@ class Product extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_lang"; $sql.= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($langtodelete)."'"; - dol_syslog(get_class($this).'::delMultiLangs sql='.$sql); + dol_syslog(get_class($this).'::delMultiLangs', LOG_DEBUG); $result = $this->db->query($sql); if ($result) { diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 9268a3a59a4..f5db524ed27 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -686,7 +686,6 @@ if (! empty($socid) && ! empty($conf->global->PRODUIT_MULTIPRICES)) $sql .= " ORDER BY p.date_price DESC, p.price_level ASC"; // $sql .= $db->plimit(); -dol_syslog("sql=" . $sql); $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index 14b1605fdd9..d8ef1565bbd 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -114,10 +114,7 @@ class Address $this->error=$langs->trans("ErrorCompanyNameAlreadyExists",$this->nom); } - else - { - dol_syslog(get_class($this)."::create echec insert sql=$sql"); - } + $this->db->rollback(); return -2; } diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 35ae30d0641..0a2ccf00638 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1370,7 +1370,7 @@ class User extends CommonObject } $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::setPassword sql=hidden", LOG_DEBUG); + dol_syslog(get_class($this)."::setPassword", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -1439,7 +1439,7 @@ class User extends CommonObject $sql.= " SET pass_temp = '".$this->db->escape($password)."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::setPassword sql=hidden", LOG_DEBUG); // No log + dol_syslog(get_class($this)."::setPassword", LOG_DEBUG); // No log $result = $this->db->query($sql); if ($result) {