diff --git a/op/op.CreateDownloadLink.php b/op/op.CreateDownloadLink.php index 7c6b1c606..5f39aa2da 100644 --- a/op/op.CreateDownloadLink.php +++ b/op/op.CreateDownloadLink.php @@ -55,7 +55,10 @@ $version = $document->getContentByVersion($version_num); if (!is_object($version)) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); } -$expiration = null; +if (isset($_POST["expdate"])) + $expiration = $_POST["expdate"]; +else + $expiration = null; if($version->createDownloadLink($user, $expiration)) { $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_create_download_link')));