diff --git a/include/class/acc_account.class.php b/include/class/acc_account.class.php index 1f28ce976..e5c7e10f1 100644 --- a/include/class/acc_account.class.php +++ b/include/class/acc_account.class.php @@ -130,7 +130,7 @@ class Acc_Account if ( $count > 0) throw new Exception (_("Poste en double"),EXC_DUPLICATE); - if (trim($this->data_sql->pcm_lib)=="") + if (noalyss_trim($this->data_sql->pcm_lib)=="") throw new Exception (_("Libellé vide"),EXC_PARAM_VALUE); // can not depend of itself diff --git a/include/class/acc_account_ledger.class.php b/include/class/acc_account_ledger.class.php index eee68a370..858b94487 100644 --- a/include/class/acc_account_ledger.class.php +++ b/include/class/acc_account_ledger.class.php @@ -634,7 +634,7 @@ class Acc_Account_Ledger function belong_ledger($p_jrn) { $filter=$this->db->get_value("select jrn_def_class_cred from jrn_def where jrn_def_id=$1", array($p_jrn)); - if ( trim ($filter) == '') + if ( noalyss_trim ($filter) == '') return 0; $valid_cred=explode(" ",$filter); diff --git a/include/class/acc_balance.class.php b/include/class/acc_balance.class.php index b9c5df774..074710ba9 100644 --- a/include/class/acc_balance.class.php +++ b/include/class/acc_balance.class.php @@ -88,12 +88,12 @@ class Acc_Balance $and=" and "; } - if ( strlen(trim($this->from_poste)) != 0 && $this->from_poste!=-1 ) + if ( strlen(noalyss_trim($this->from_poste)) != 0 && $this->from_poste!=-1 ) { $from_poste=" $and j_poste::text >= '".$this->from_poste."'"; $and=" and "; } - if ( strlen(trim($this->to_poste)) != 0 && $this->to_poste!=-1 ) + if ( strlen(noalyss_trim($this->to_poste)) != 0 && $this->to_poste!=-1 ) { $to_poste=" $and j_poste::text <= '".$this->to_poste."'"; $and=" and "; diff --git a/include/class/acc_ledger.class.php b/include/class/acc_ledger.class.php index b64a642ff..a5ba23aaa 100644 --- a/include/class/acc_ledger.class.php +++ b/include/class/acc_ledger.class.php @@ -1709,7 +1709,7 @@ class Acc_Ledger extends jrn_def_sql $card.=$comma.$item['deb']; $comma=','; } - if (strlen(trim($item['cred']))!='') + if (strlen(noalyss_trim($item['cred']))!=0) { $card.=$comma.$item['cred']; $comma=','; @@ -2230,7 +2230,7 @@ class Acc_Ledger extends jrn_def_sql $min_date); } $saldo=$bank_card->get_bk_balance($cond); - $ret['amount']=bcsub($saldo['debit'], $saldo['credit']); + $ret['amount']=noalyss_bcsub($saldo['debit'], $saldo['credit']); } return $ret; } diff --git a/include/class/card_property.class.php b/include/class/card_property.class.php index d9fcf211f..881ad3da2 100644 --- a/include/class/card_property.class.php +++ b/include/class/card_property.class.php @@ -595,7 +595,7 @@ class Card_Property } // Normal traitement $sql="update fiche_detail set ad_value=$1 where jft_id=$2"; - $p_fiche->cn->exec_sql($sql, array(strip_tags($value->av_text), $jft_id)); + $p_fiche->cn->exec_sql($sql, array(noalyss_strip_tags($value->av_text), $jft_id)); } if ($commit) { diff --git a/include/class/contact.class.php b/include/class/contact.class.php index 94da9dfa4..f45392c4e 100644 --- a/include/class/contact.class.php +++ b/include/class/contact.class.php @@ -68,7 +68,7 @@ class contact extends Fiche $bar=navigation_bar($offset,$all_contact,$_SESSION[SESSION_KEY.'g_pagesize'],$page); // set a filter ? $search=""; - if ( trim($p_search) != "" ) + if ( noalyss_trim($p_search) != "" ) { $search=" and f_id in (select f_id from fiche_Detail diff --git a/include/class/document.class.php b/include/class/document.class.php index 4b8764604..65b903ca9 100644 --- a/include/class/document.class.php +++ b/include/class/document.class.php @@ -1806,11 +1806,11 @@ class Document { if ($p_type=='OOo') { - $p_value=str_replace('&', '&', $p_value); - $p_value=str_replace('<', '<', $p_value); - $p_value=str_replace('>', '>', $p_value); - $p_value=str_replace('"', '"', $p_value); - $p_value=str_replace("'", ''', $p_value); + $p_value=noalyss_str_replace('&', '&', $p_value); + $p_value=noalyss_str_replace('<', '<', $p_value); + $p_value=noalyss_str_replace('>', '>', $p_value); + $p_value=noalyss_str_replace('"', '"', $p_value); + $p_value=noalyss_str_replace("'", ''', $p_value); } $p_buffer=preg_replace('/'.$p_pattern.'/i', $p_value, $p_buffer, $p_limit); } diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php index e17467a65..99bed6455 100644 --- a/include/class/fiche.class.php +++ b/include/class/fiche.class.php @@ -1242,7 +1242,7 @@ class Fiche $res=$this->cn->exec_sql($sql,[$this->id,$p_attr]); if ( Database::num_row($res) == 0 ) return true; $text=Database::fetch_result($res,0,0); - return (strlen(trim($text)) > 0)?false:true; + return (strlen(noalyss_trim($text)) > 0)?false:true; } @@ -1291,7 +1291,7 @@ class Fiche list($max,$min)=$tPeriode->get_limit($exercice); - if ( trim($p_search) != "" ) + if ( noalyss_trim($p_search) != "" ) { $search.=" and f_id in (select distinct f_id from fiche_detail @@ -1622,7 +1622,7 @@ class Fiche $filter_jrn=$this->cn->make_list("select jrn_def_fiche_deb from jrn_Def where jrn_def_id=$1", array($jrn)); - if (trim($filter_jrn)!='') + if (noalyss_trim($filter_jrn)!='') $fp1=" fd_id in (".$filter_jrn.")"; else $fp1="fd_id < 0"; @@ -1630,7 +1630,7 @@ class Fiche $filter_jrn=$this->cn->make_list("select jrn_def_fiche_cred from jrn_Def where jrn_def_id=$1", array($jrn)); - if (trim($filter_jrn)!='') + if (noalyss_trim($filter_jrn)!='') $fp2=" fd_id in (".$filter_jrn.")"; else $fp2="fd_id < 0"; @@ -1643,7 +1643,7 @@ class Fiche $filter_fd_id=' true'; break; default: - if (trim($typecard)!='') + if (noalyss_trim($typecard)!='') $filter_fd_id=' fd_id in ('.$typecard.')'; else $filter_fd_id=' fd_id < 0'; diff --git a/include/class/print_ledger_detail_item.class.php b/include/class/print_ledger_detail_item.class.php index c34629437..531927aa2 100644 --- a/include/class/print_ledger_detail_item.class.php +++ b/include/class/print_ledger_detail_item.class.php @@ -127,9 +127,9 @@ class Print_Ledger_Detail_Item extends Print_Ledger $this->write_cell(20, $high, nbm($row['tot_tva_np']), 1, 0, 'R', true); $this->write_cell(20, $high, nbm($row['other_tax_amount']), 1, 0, 'R', true); $this->write_cell(20, $high, nbm($row['tot_vat']), 1, 0, 'R', true); - $sum=bcadd($row['htva'],$row['tot_vat']); - $sum=bcadd($row['other_tax_amount'],$sum); - $sum=bcsub($sum,$row['tot_tva_np']); + $sum=noalyss_bcadd($row['htva'],$row['tot_vat']); + $sum=noalyss_bcadd($row['other_tax_amount'],$sum); + $sum=noalyss_bcsub($sum,$row['tot_tva_np']); $this->write_cell(20, $high, nbm($sum), 1, 0, 'R', true); $internal=$row['jr_internal']; $this->line_new(6); diff --git a/include/compta_fin_saldo.inc.php b/include/compta_fin_saldo.inc.php index 72355df75..7e90935a8 100644 --- a/include/compta_fin_saldo.inc.php +++ b/include/compta_fin_saldo.inc.php @@ -121,9 +121,9 @@ for ($i=0; $i<$nb_array; $i++) $array[$i]->strAttribut(ATTR_DEF_QUICKCODE)). ""; - $saldo_rec=bcsub($saldo_reconcilied['debit'], + $saldo_rec=noalyss_bcsub($saldo_reconcilied['debit'], $saldo_reconcilied['credit']); - $diff=bcsub($saldo_not_reconcilied['debit'], + $diff=noalyss_bcsub($saldo_not_reconcilied['debit'], $saldo_not_reconcilied['credit']); echo "