blob: 3a8ee5baee57af0646f7b4f3ec01de6ecadfe544 [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(visual::getContinueUrl("incidents.php", "unexpected", "POST"));
9}
10
11$id = (int)$_POST["id"];
12
13if (incidents::invalidate($id)) {
14 security::go(visual::getContinueUrl("incidents.php", "invalidated", "POST"));
15} else {
16 security::go(visual::getContinueUrl("incidents.php", "unexpected", "POST"));
17}