From d75d8b64fcba92ec458b59fa92121478a76a1303 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Sat, 28 Jul 2012 09:30:39 +0000 Subject: [PATCH] Select only one day by default for weekly recurrence --- dav/common/calendar.fnk.php | 6 +++--- dav/common/wdcal_edit.inc.php | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dav/common/calendar.fnk.php b/dav/common/calendar.fnk.php index b03ed7be..1bfe97e2 100644 --- a/dav/common/calendar.fnk.php +++ b/dav/common/calendar.fnk.php @@ -347,7 +347,7 @@ function dav_get_current_user_calendar_by_id(&$server, $id, $with_privilege = "" /** * @param string $uid - * @return Sabre_VObject_Component_VEvent $vObject + * @return Sabre_VObject_Component_VCalendar $vObject */ function dav_create_empty_vevent($uid = "") { @@ -359,8 +359,8 @@ function dav_create_empty_vevent($uid = "") /** - * @param Sabre_VObject_Component_VEvent $vObject - * @return Sabre_VObject_Component|null + * @param Sabre_VObject_Component_VCalendar $vObject + * @return Sabre_VObject_Component_VEvent|null */ function dav_get_eventComponent(&$vObject) { diff --git a/dav/common/wdcal_edit.inc.php b/dav/common/wdcal_edit.inc.php index 261e7866..dac49368 100644 --- a/dav/common/wdcal_edit.inc.php +++ b/dav/common/wdcal_edit.inc.php @@ -261,7 +261,8 @@ function wdcal_getEditPage_str(&$localization, $baseurl, $calendar_id, $uri) if ($recurrence && $recurrence->byDay) { $byday = $recurrence->byDay; } else { - $byday = array("MO", "TU", "WE", "TH", "FR", "SA", "SU"); + $days = array("MO", "TU", "WE", "TH", "FR", "SA", "SU"); + $byday = array($days[date("N", $event["StartTime"]) - 1]); } if ($localization->getFirstDayOfWeek() == 0) { $out .= "