blob: c5116ddaa90aa02206b93d738fed9fd91e0902be [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_NEMPTY]
7])) {
8 security::go("workers.php?msg=empty");
9}
10
11$id = $_POST["id"];
12
13$item = workers::getWorkHistoryItem($id);
14if ($item === false) return false;
15
16if (workers::deleteWorkHistoryItem($id)) security::go("workers.php?openWorkerHistory=".(int)$item["worker"]);
17else security::go("workers.php?msg=unexpected");