[PHPPlanner-cvs] phpplanner/lib calendar.class.php,1.3,1.4
Status: Beta
Brought to you by:
tomsommer
From: Tom S. <tom...@us...> - 2004-04-25 22:01:53
|
Update of /cvsroot/phpplanner/phpplanner/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3864/lib Modified Files: calendar.class.php Log Message: Fixed a shitload of bugs Index: calendar.class.php =================================================================== RCS file: /cvsroot/phpplanner/phpplanner/lib/calendar.class.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- calendar.class.php 24 Apr 2004 16:48:37 -0000 1.3 +++ calendar.class.php 25 Apr 2004 22:01:43 -0000 1.4 @@ -90,7 +90,7 @@ { mysql_query("INSERT INTO cal_items (`date`,`caption`,`description`,`added_by`,`last_updated`,`private`,`color`,`created`) - VALUES(". $stamp .", '". $caption ."', '". $description ."', ". $userid .", NOW(), '". $private ."', $color, " . time() . ")") or die(mysql_error()); + VALUES(". $stamp .", '". $caption ."', '". $description ."', ". $userid .", NOW(), '". $private ."', ". (int)$color .", " . time() . ")") or die(mysql_error()); send_header('Location: day.php?s='. $stamp); } else @@ -112,7 +112,6 @@ } function edit_event($stamp,$id,$newCaption,$new_escription,$private=0,$color=0) { - $SQL = mysql_query("SELECT * FROM cal_items WHERE id = ". $id ." @@ -126,8 +125,8 @@ last_updated = NOW(), edited_by = ". $_SESSION['userid'] .", private = ". $private .", - color = $color - WHERE id = ". $id); + color = ". (int)$color ." + WHERE id = ". $id) or die(mysql_error()); send_header('Location: day.php?s='. $stamp); } else |