add checking for revision date

This commit is contained in:
Uwe Steinmann 2025-03-14 16:51:34 +01:00
parent 2eb19048ab
commit 789b5daaf8

View File

@ -55,10 +55,12 @@ if (!is_object($content)) {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version"));
}
if (isset($_POST["startdate"])) {
$ts = null;
if (!empty($_POST["startdate"])) {
$ts = makeTsFromDate($_POST["startdate"]);
} else {
$ts = time();
}
if(!$ts) {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_revision_date"));
}
$startdate = date('Y-m-d', $ts);