From b95150afa4bcd182ddce2d9d0035abed988b69f2 Mon Sep 17 00:00:00 2001 From: Nestor <npegane@hotmail.com> Date: Thu, 1 Feb 2018 11:48:07 +0100 Subject: [PATCH] FIX #7068 foreach on res_ids added for notes --- .../actions/confirm_status.php | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/apps/maarch_entreprise/actions/confirm_status.php b/apps/maarch_entreprise/actions/confirm_status.php index ee5191c6543..7c9da1db935 100755 --- a/apps/maarch_entreprise/actions/confirm_status.php +++ b/apps/maarch_entreprise/actions/confirm_status.php @@ -134,7 +134,6 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col $_SESSION['action_error'] = ''; $result = ''; $coll_id = $_SESSION['current_basket']['coll_id']; - $res_id = $arr_id[0]; require_once("core/class/class_security.php"); $sec = new security(); $table = $sec->retrieve_table_from_coll($coll_id); @@ -142,13 +141,19 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col # save note if($formValues['note_content_to_users'] != ''){ //Add notes - $nb_avis = $sequence +1; - $userIdTypist = $_SESSION['user']['UserId']; - $content_note = $formValues['note_content_to_users']; - $content_note = str_replace(";", ".", $content_note); - $content_note = str_replace("--", "-", $content_note); - $content_note = $content_note; - $note->addNote($res_id, $coll_id, $content_note); + $msgResult = ""; + foreach($arr_id as $res_id){ + $nb_avis = $sequence +1; + $userIdTypist = $_SESSION['user']['UserId']; + $content_note = $formValues['note_content_to_users']; + $content_note = str_replace(";", ".", $content_note); + $content_note = str_replace("--", "-", $content_note); + $content_note = $content_note; + $msgResult .= $res_id.'#'; + $note->addNote($res_id, $coll_id, $content_note); + + } + } return array('result' => $res_id.'#', 'history_msg' => ''); -- GitLab