blob: bc42d4db4aaf5b8e1a3e6167371ae36e7d4de695 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2require_once("core.php");
3security::checkType(security::ADMIN);
4
5if (!security::checkParams("POST", [
6 ["id", security::PARAM_ISINT]
7])) {
8 security::go("incidents.php?msg=unexpected");
9}
10
11$id = (int)$_POST["id"];
12$details = ((isset($_POST["details"]) && is_string($_POST["details"])) ? $_POST["details"] : "");
13
14$status = incidents::editDetails($id, $details);
15switch ($status) {
16 case 0:
17 security::go("incidents.php?msg=modified");
18 break;
19
20 case 1:
21 security::go("incidents.php?msg=cannotmodify");
22 break;
23
24 default:
25 security::go("incidents.php?msg=unexpected");
26}