Merge branch 'seeddms-4.2.1' into develop

This commit is contained in:
Uwe Steinmann 2013-04-30 17:15:21 +02:00
commit 9a9d570d5f
2 changed files with 10 additions and 2 deletions

View File

@ -76,7 +76,15 @@ if (!is_numeric($sequence)) {
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("invalid_sequence"));
}
$expires = (isset($_POST["expires"]) && $_POST["expires"] == "true") ? mktime(0,0,0, intval($_POST["expmonth"]), intval($_POST["expday"]), intval($_POST["expyear"])) : false;
$expires = false;
if ($_POST["expires"] != "false") {
if($_POST["expdate"]) {
$tmp = explode('-', $_POST["expdate"]);
$expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]);
} else {
$expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
}
}
// Get the list of reviewers and approvers for this document.
$reviewers = array();

View File

@ -220,7 +220,7 @@ if ($_FILES['userfile']['error'] == 0) {
$expires = false;
if ($_POST["expires"] != "false") {
if($_POST["expdate"]) {
$tmp = explode('/', $_POST["expdate"]);
$tmp = explode('-', $_POST["expdate"]);
$expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]);
} else {
$expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);