Project import generated by Copybara.

GitOrigin-RevId: 63746295f1a5ab5a619056791995793d65529e62
diff --git a/src/dodeleteworkhistoryitem.php b/src/dodeleteworkhistoryitem.php
new file mode 100644
index 0000000..c5116dd
--- /dev/null
+++ b/src/dodeleteworkhistoryitem.php
@@ -0,0 +1,17 @@
+<?php
+require_once("core.php");
+security::checkType(security::ADMIN);
+
+if (!security::checkParams("POST", [
+  ["id", security::PARAM_NEMPTY]
+])) {
+  security::go("workers.php?msg=empty");
+}
+
+$id = $_POST["id"];
+
+$item = workers::getWorkHistoryItem($id);
+if ($item === false) return false;
+
+if (workers::deleteWorkHistoryItem($id)) security::go("workers.php?openWorkerHistory=".(int)$item["worker"]);
+else security::go("workers.php?msg=unexpected");