]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix fromtime/totime warnings
authorBart Visscher <bartv@thisnet.nl>
Tue, 25 Oct 2011 17:59:23 +0000 (19:59 +0200)
committerBart Visscher <bartv@thisnet.nl>
Tue, 25 Oct 2011 17:59:23 +0000 (19:59 +0200)
apps/calendar/lib/object.php

index 4afeb341a9c9264d7dd2cdc423bcaf1ef5f5d87a..9a343a23764094ebd52302edd474beaefa0dcd45 100644 (file)
@@ -426,7 +426,7 @@ class OC_Calendar_Object{
                        $errarr['endbeforestart'] = 'true';
                        $errnum++;
                }
-               if($fromday == $today && $frommonth == $tomonth && $fromyear == $toyear){
+               if(!$allday && $fromday == $today && $frommonth == $tomonth && $fromyear == $toyear){
                        list($tohours, $tominutes) = explode(':', $request['totime']);
                        list($fromhours, $fromminutes) = explode(':', $request['fromtime']);
                        if($tohours < $fromhours){
@@ -481,9 +481,11 @@ class OC_Calendar_Object{
                $categories = isset($request["categories"]) ? $request["categories"] : null;
                $allday = isset($request["allday"]);
                $from = $request["from"];
-               $fromtime = $request["fromtime"];
                $to  = $request["to"];
-               $totime = $request["totime"];
+               if (!$allday){
+                       $fromtime = $request['fromtime'];
+                       $totime = $request['totime'];
+               }
                $description = $request["description"];
                //$repeat = $request["repeat"];
                /*switch($request["repeatfreq"]){