Project import generated by Copybara.
GitOrigin-RevId: 63746295f1a5ab5a619056791995793d65529e62
diff --git a/src/doeditincidentcomment.php b/src/doeditincidentcomment.php
new file mode 100644
index 0000000..bc42d4d
--- /dev/null
+++ b/src/doeditincidentcomment.php
@@ -0,0 +1,26 @@
+<?php
+require_once("core.php");
+security::checkType(security::ADMIN);
+
+if (!security::checkParams("POST", [
+ ["id", security::PARAM_ISINT]
+])) {
+ security::go("incidents.php?msg=unexpected");
+}
+
+$id = (int)$_POST["id"];
+$details = ((isset($_POST["details"]) && is_string($_POST["details"])) ? $_POST["details"] : "");
+
+$status = incidents::editDetails($id, $details);
+switch ($status) {
+ case 0:
+ security::go("incidents.php?msg=modified");
+ break;
+
+ case 1:
+ security::go("incidents.php?msg=cannotmodify");
+ break;
+
+ default:
+ security::go("incidents.php?msg=unexpected");
+}