Project import generated by Copybara.

GitOrigin-RevId: 63746295f1a5ab5a619056791995793d65529e62
diff --git a/src/doinvalidateincident.php b/src/doinvalidateincident.php
new file mode 100644
index 0000000..3a8ee5b
--- /dev/null
+++ b/src/doinvalidateincident.php
@@ -0,0 +1,17 @@
+<?php
+require_once("core.php");
+security::checkType(security::ADMIN);
+
+if (!security::checkParams("POST", [
+  ["id", security::PARAM_ISINT]
+])) {
+  security::go(visual::getContinueUrl("incidents.php", "unexpected", "POST"));
+}
+
+$id = (int)$_POST["id"];
+
+if (incidents::invalidate($id)) {
+  security::go(visual::getContinueUrl("incidents.php", "invalidated", "POST"));
+} else {
+  security::go(visual::getContinueUrl("incidents.php", "unexpected", "POST"));
+}