mirror of
https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management.git
synced 2025-06-28 13:48:42 +02:00
Correction du schéma de la base de données et des hooks
This commit is contained in:
@ -42,13 +42,29 @@ if (isset($_POST["add"])) {
|
||||
Session::checkRight("plugin_soc_case", UPDATE);
|
||||
$case = new PluginSocCase();
|
||||
$case->getFromDB($_POST['plugin_soc_cases_id']);
|
||||
$tickets_id = $case->createTicket($_POST);
|
||||
|
||||
// Link existing ticket to case
|
||||
if (isset($_POST['tickets_id']) && $_POST['tickets_id'] > 0) {
|
||||
$case->addTicket($_POST['tickets_id']);
|
||||
} else {
|
||||
// Create new ticket from case
|
||||
$case->createTicket($_POST);
|
||||
}
|
||||
|
||||
Html::back();
|
||||
} else if (isset($_POST["add_change"])) {
|
||||
Session::checkRight("plugin_soc_case", UPDATE);
|
||||
$case = new PluginSocCase();
|
||||
$case->getFromDB($_POST['plugin_soc_cases_id']);
|
||||
$changes_id = $case->createChange($_POST);
|
||||
|
||||
// Link existing change to case
|
||||
if (isset($_POST['changes_id']) && $_POST['changes_id'] > 0) {
|
||||
$case->addChange($_POST['changes_id']);
|
||||
} else {
|
||||
// Create new change from case
|
||||
$case->createChange($_POST);
|
||||
}
|
||||
|
||||
Html::back();
|
||||
} else {
|
||||
$id = "";
|
||||
|
Reference in New Issue
Block a user