diff --git a/apps/maarch_entreprise/lang/en.php b/apps/maarch_entreprise/lang/en.php index 5c4cf3a99bba0b055c7b7363931673ca2c3a017b..b6c41757837c200a08fec4cdb3bc1645641010af 100755 --- a/apps/maarch_entreprise/lang/en.php +++ b/apps/maarch_entreprise/lang/en.php @@ -2044,5 +2044,5 @@ if(!defined('_SAVED_CHANGE')) define('_SAVED_CHANGE', 'Saved change'); /** Generic messages **/ -if (!defined('_DOC_CREATED_WITH_STATUS')) - define('_DOC_CREATED_WITH_STATUS', 'Document created with status'); \ No newline at end of file +if (!defined('_DOC_CREATED')) + define('_DOC_CREATED', 'Document created'); \ No newline at end of file diff --git a/apps/maarch_entreprise/lang/fr.php b/apps/maarch_entreprise/lang/fr.php index fe6f4383e40277e13c081147cb08bd5c03bff6f1..704d8b3618ff3e05d2f11fb831845b8b9bc84f11 100755 --- a/apps/maarch_entreprise/lang/fr.php +++ b/apps/maarch_entreprise/lang/fr.php @@ -2101,5 +2101,5 @@ if(!defined('_SAVED_CHANGE')) define('_SAVED_CHANGE', 'Modification enregistrée'); /** Generic messages **/ -if (!defined('_DOC_CREATED_WITH_STATUS')) - define('_DOC_CREATED_WITH_STATUS', 'Document créé avec le statut'); +if (!defined('_DOC_CREATED')) + define('_DOC_CREATED', 'Document créé'); diff --git a/core/class/class_resource.php b/core/class/class_resource.php index e7ded1d2bb2bd0f73eea1fdeafd125b4a4b955c4..d1964c346cd97fb2ead1482e38947f7121b3847e 100755 --- a/core/class/class_resource.php +++ b/core/class/class_resource.php @@ -179,6 +179,16 @@ ) ); $res = $stmt->fetchObject(); + + if($table_res == 'res_letterbox'){ + require_once("core".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_history.php"); + $hist = new history(); + $hist->add( + $table_res, + $res->res_id, 'ADD', 'resadd', + _DOC_CREATED, $_SESSION['config']['databasetype'], 'apps'); + } + return $res->res_id; } } diff --git a/core/manage_action.php b/core/manage_action.php index f636022f0a563f5f36dc032a2faf8603b5e5872b..5f91726a383e0c27b5ddb4e3268bbfb7bda5148f 100755 --- a/core/manage_action.php +++ b/core/manage_action.php @@ -163,12 +163,6 @@ elseif(trim($_POST['req']) == 'change_status' && !empty($_POST['values']) && !em echo "{status : 1, error_txt : '".addslashes(_ERROR_WITH_STATUS." ".functions::xssafe($query_str))."'}"; exit(); } - require_once("core".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_history.php"); - $hist = new history(); - $hist->add( - $_POST['table'], - $arr_id[$i], 'ACTION#', 'resadd', - _DOC_CREATED_WITH_STATUS . ' : '. $lineStatus->label_status, $_SESSION['config']['databasetype'], 'apps'); } } echo json_encode(['status' => 0, 'error_txt' => _STATUS_UPDATED.' : '.functions::xssafe($_POST['new_status']) ]);