From d7473602cb38f05e5d4f613ddc4ad78df1eef4b5 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 31 Dec 2008 11:26:04 +0000 Subject: [PATCH] Fix Cosmetic bug : analytic plan Change : the class widget SELECT do not protect against Cross scripting Fix Bug : the quick writing doesn't have a "use predefined operation" Change : after computing the internal code the data member jr_internal is set Bug : protect against CS in fiche_search.php --- html/fiche_search.php | 4 ++-- include/class_acc_ledger.php | 4 +++- include/class_anc_operation.php | 2 +- include/class_anc_plan.php | 2 +- include/class_widget.php | 2 +- include/quick_writing.inc.php | 7 +++++-- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/html/fiche_search.php b/html/fiche_search.php index d0616cf92..05722099a 100644 --- a/html/fiche_search.php +++ b/html/fiche_search.php @@ -214,9 +214,9 @@ if ( $row['tva_label'] , $qcode ); - $r.=" ".$row['vw_name']; + $r.=" ".h($row['vw_name']); if ( $row['vw_addr'] !="") - $r.="
Adresse: ".$row['vw_addr']." ".$row['vw_cp'].""; + $r.="
Adresse: ".h($row['vw_addr'])." ".h($row['vw_cp']).""; $r.=""; } } diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 0dd86bef1..3ae76bede 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -1184,7 +1184,8 @@ class Acc_Ledger { } /*! - * \brief + * \brief compute the internal code of the saved operation and set the $this->jr_internal to + * the computed value * * \param $p_grpt id in jr_grpt_ * @@ -1200,6 +1201,7 @@ class Acc_Ledger { $type=$atype['jrn_def_code']; $internal_code=sprintf("%d%s-%s",dossier::id(),$type,$num); echo_debug (__FILE__,__LINE__,"internal_code = $internal_code"); + $this->jr_internal=$internal_code; return $internal_code; } diff --git a/include/class_anc_operation.php b/include/class_anc_operation.php index 3a9ec48b5..0c9b5913b 100644 --- a/include/class_anc_operation.php +++ b/include/class_anc_operation.php @@ -390,7 +390,7 @@ function get_balance($p_from,$p_to,$p_plan_id) $result.=''; else $result.='
'; - $result.="".h($plan->header()).""; + $result.="".$plan->header().""; diff --git a/include/class_anc_plan.php b/include/class_anc_plan.php index 4a5fa35ca..e4fc846d0 100644 --- a/include/class_anc_plan.php +++ b/include/class_anc_plan.php @@ -165,7 +165,7 @@ class Anc_Plan if ( empty($a_plan)) return ""; foreach ($a_plan as $r_plan) { - $res.=""; + $res.=""; } return $res; } diff --git a/include/class_widget.php b/include/class_widget.php index 6cd0fca61..68b69b7c8 100644 --- a/include/class_widget.php +++ b/include/class_widget.php @@ -162,7 +162,7 @@ class widget { { $checked=($this->selected==$this->value[$i]['value'])?"SELECTED":""; $r.='
montant
montant
".$r_plan['name']."".h($r_plan['name'])."