Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Ehrke <georg.stefan.germany@googlemail.com>2011-09-29 01:28:14 +0400
committerGeorg Ehrke <georg.stefan.germany@googlemail.com>2011-09-29 01:28:14 +0400
commit8c405a59d80898b56e411f40bfb07456f910cc49 (patch)
tree198e205edd71fc6b03cf7c1b4cb4f9ff2bb4177d /apps/calendar
parent61aa00899d33a3b9706cf321555405fedf044775 (diff)
little bug fixes in calendar app
Diffstat (limited to 'apps/calendar')
-rw-r--r--apps/calendar/ajax/neweventform.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/apps/calendar/ajax/neweventform.php b/apps/calendar/ajax/neweventform.php
index 7a4c6f469e5..7099ea718e9 100644
--- a/apps/calendar/ajax/neweventform.php
+++ b/apps/calendar/ajax/neweventform.php
@@ -29,6 +29,9 @@ if($starttime != 'undefined' && !is_nan($starttime) && !$allday){
$startminutes = '00';
}else{
$starttime = date('H');
+ if(strlen($starttime) == 2 && $starttime <= 9){
+ $starttime = substr($starttime, 1, 1);
+ }
$startminutes = date('i');
}
@@ -38,7 +41,18 @@ $endyear = $startyear;
$endtime = $starttime;
$endminutes = $startminutes;
if($endtime == 23) {
- $endday++;
+ if($startday == date(t, mktime($starttime, $startminutes, 0, $startmonth, $startday, $startyear))){
+ $datetimestamp = mktime(0, 0, 0, $startmonth, $startday, $startyear);
+ $datetimestamp = $datetimestamp + 86400;
+ $endmonth = date("m", $datetimestamp);
+ $endday = date("d", $datetimestamp);
+ $endyear = date("Y", $datetimestamp);
+ }else{
+ $endday++;
+ if($endday <= 9){
+ $endday = "0" . $endday;
+ }
+ }
$endtime = 0;
} else {
$endtime++;