- no need to sanitize month, day, year because they are turned into an int

This commit is contained in:
steinm 2011-12-01 21:31:17 +00:00
parent 6945fcc0a8
commit 02d81d4525

View File

@ -47,10 +47,10 @@ if (!isset($_POST["name"]) || !isset($_POST["comment"]) ) {
$name = sanitizeString($_POST["name"]); $name = sanitizeString($_POST["name"]);
$comment = sanitizeString($_POST["comment"]); $comment = sanitizeString($_POST["comment"]);
$from = mktime(0,0,0, intval($_POST["frommonth"]), intval($_POST["fromday"]), intval($_POST["fromyear"])); $from = mktime(0,0,0, intval($_POST["frommonth"]), intval($_POST["fromday"]), intval($_POST["fromyear"]));
$to = mktime(23,59,59, sanitizeString($_POST["tomonth"]), sanitizeString($_POST["today"]), sanitizeString($_POST["toyear"])); $to = mktime(23,59,59, intval($_POST["tomonth"]), intval($_POST["today"]), intval($_POST["toyear"]));
if ($to<$from){ if ($to<$from){
$to= mktime(23,59,59, sanitizeString($_POST["frommonth"]), sanitizeString($_POST["fromday"]), sanitizeString($_POST["fromyear"])); $to= mktime(23,59,59, intval($_POST["frommonth"]), intval($_POST["fromday"]), intval($_POST["fromyear"]));
} }
$res = addEvent($from, $to, $name, $comment); $res = addEvent($from, $to, $name, $comment);