insert(); header("Location: ".$_SERVER['HTTP_REFERER']); } public function deleteAction(Array $A_urlParams = null, Array $A_postParams = null) { Session::login_or_die(); $I_appr_id = Utils::intOrDie($A_urlParams[0]); $O_appr = ApprModel::getApprById($I_appr_id); if ($O_appr === null) { throw new HTTPSpecialCaseException(404); } if ($O_appr->I_AUTHOR_ID !== $_SESSION["ID"]) { Session::admin_or_die(); } $O_appr->delete(); header("Location: ".$_SERVER['HTTP_REFERER']); } }