Skip to content
Snippets Groups Projects
Commit 2e7aebd4 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FIX #4937 add hist var in action management in order to not log main action if...

FIX #4937 add hist var in action management in order to not log main action if secondary action chosen
parent e44868f9
No related branches found
No related tags found
No related merge requests found
...@@ -80,7 +80,11 @@ if($_POST['req'] == 'valid_form' && !empty($_POST['action_id']) && isset($_POST[ ...@@ -80,7 +80,11 @@ if($_POST['req'] == 'valid_form' && !empty($_POST['action_id']) && isset($_POST[
$label_action = $res->label_action; $label_action = $res->label_action;
$status = $res->id_status; $status = $res->id_status;
$action_page = $res->action_page; $action_page = $res->action_page;
$bool_history = $res->history; if($res->history == 'Y' && $_POST['hist']!='N'){
$bool_history = $res->history;
}else{
$bool_history = 'N';
}
$create_id = $res->create_id; $create_id = $res->create_id;
//No script defined for this action //No script defined for this action
...@@ -194,8 +198,11 @@ else if(empty($_POST['values']) || !isset($_POST['action_id']) || empty($_POST[' ...@@ -194,8 +198,11 @@ else if(empty($_POST['values']) || !isset($_POST['action_id']) || empty($_POST['
$label_action = $res->label_action; $label_action = $res->label_action;
$status = $res->id_status; $status = $res->id_status;
$action_page = $res->action_page; $action_page = $res->action_page;
$bool_history = $res->history; if($res->history == 'Y' && $_POST['hist']!='N'){
$bool_history = $res->history;
}else{
$bool_history = 'N';
}
//No script defined for this action //No script defined for this action
if($action_page == '') if($action_page == '')
{ {
...@@ -386,7 +393,7 @@ else if(empty($_POST['values']) || !isset($_POST['action_id']) || empty($_POST[' ...@@ -386,7 +393,7 @@ else if(empty($_POST['values']) || !isset($_POST['action_id']) || empty($_POST['
require_once("core".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_history.php"); require_once("core".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_history.php");
$hist = new history(); $hist = new history();
$arr_res = explode('#', $res_action['result']); $arr_res = explode('#', $res_action['result']);
for($i=0; $i<count($arr_res );$i++) for($i=0; $i<count($arr_res );$i++)
{ {
if(!empty($arr_res[$i])) if(!empty($arr_res[$i]))
{ {
......
...@@ -9,5 +9,6 @@ ...@@ -9,5 +9,6 @@
<parameter name="values" type="string" /> <parameter name="values" type="string" />
<parameter name="form_to_check" type="identifier" /> <parameter name="form_to_check" type="identifier" />
<parameter name="new_status" type="identifier" /> <parameter name="new_status" type="identifier" />
<parameter name="hist" type="string" />
</validationRule> </validationRule>
</validationRules> </validationRules>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment