From: Arun Persaud Date: Tue, 24 Feb 2009 05:36:36 +0000 (-0800) Subject: BUGFIX: vacation was set even when no date was entered X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=397a0a16021c28327d45568637cbcc7c05c1c27d;ds=sidebyside BUGFIX: vacation was set even when no date was entered the vacation is set to the empty string in case nothing is entered, need to check for this. --- diff --git a/include/preferences.php b/include/preferences.php index a319130..f42ae82 100644 --- a/include/preferences.php +++ b/include/preferences.php @@ -33,7 +33,9 @@ DB_update_user_timestamp($myid); * update the database and track changes with a variable, so that * we can later highlight the changed value */ -if(myisset('vacation_start','vacation_stop','vacation_comment')) +if(myisset('vacation_start','vacation_stop','vacation_comment') && + ($_REQUEST['vacation_start']!='' || $_REQUEST['vacation_stop']!='') + ) { $vacation_start = $_REQUEST['vacation_start'].' 00:00:00'; $vacation_stop = $_REQUEST['vacation_stop'].' 23:59:59';