From: Tobias Hößl Date: Sat, 28 Jul 2012 09:30:39 +0000 (+0000) Subject: Select only one day by default for weekly recurrence X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d75d8b64fcba92ec458b59fa92121478a76a1303;p=friendica-addons.git Select only one day by default for weekly recurrence --- 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 .= "