check if expires and sequence is set

This commit is contained in:
Uwe Steinmann 2015-06-18 17:31:56 +02:00
parent 0d19b2d52e
commit 65aa3eca27

View File

@ -63,7 +63,7 @@ if(isset($_POST['categoryidform1'])) {
} else {
$categories = array();
}
$sequence = $_POST["sequence"];
$sequence = isset($_POST["sequence"]) ? $_POST["sequence"] : "keep";
$sequence = str_replace(',', '.', $_POST["sequence"]);
if (!is_numeric($sequence)) {
$sequence="keep";
@ -180,7 +180,7 @@ if (($oldcomment = $document->getComment()) != $comment) {
}
$expires = false;
if ($_POST["expires"] != "false") {
if (isset($_POST["expires"]) && $_POST["expires"] != "false") {
if($_POST["expdate"]) {
$tmp = explode('-', $_POST["expdate"]);
$expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]);