summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2009-02-23 21:36:36 -0800
committerArun Persaud <arun@nubati.net>2009-02-23 21:36:36 -0800
commit397a0a16021c28327d45568637cbcc7c05c1c27d (patch)
treec50ac3e1cfee80c9e1bb8b7a0d5a33e51e34889c
parentd661e260855977d34672388cfa8766de55a73f93 (diff)
downloade-DoKo-397a0a16021c28327d45568637cbcc7c05c1c27d.tar.gz
e-DoKo-397a0a16021c28327d45568637cbcc7c05c1c27d.tar.bz2
e-DoKo-397a0a16021c28327d45568637cbcc7c05c1c27d.zip
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.
-rw-r--r--include/preferences.php4
1 files changed, 3 insertions, 1 deletions
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';