Merge branch 'spidev' into 'master'
Kalender See merge request fronk/thetool!763
This commit is contained in:
@@ -157,12 +157,17 @@ class CalendarModel
|
||||
$where .= " AND calendar_id IN (" . implode(",", $visibleCalendars) . ")";
|
||||
$whereTimeRecording = " AND `Calendar`.`go_calendar_id` IN (" . implode(",", $visibleCalendars) . ")";
|
||||
}
|
||||
$sql = "SELECT `cal_events`.id, uuid, calendar_id, `cal_events`.user_id, start_time, end_time, timezone, all_day_event, `cal_events`.name,`cal_calendars`.name calendar_name, description, location, repeat_end_time, reminder, ctime,cname, mtime,mname, muser_id, busy, status, resource_event_id, private, rrule, `cal_events`.background, `cal_events`.files_folder_id, read_only, category_id, exception_for_event_id, recurrence_id, is_organizer,event_type,busy,recurrence FROM cal_events INNER JOIN `cal_calendars` ON (`cal_calendars`.`id`=`cal_events`.`calendar_id`) WHERE 1=1 $where ";
|
||||
$sql = "SELECT `cal_events`.id,`cal_events`.categories, uuid, calendar_id, `cal_events`.user_id, start_time, end_time, timezone, all_day_event, `cal_events`.name,`cal_calendars`.name calendar_name, description, location, repeat_end_time, reminder, ctime,cname, mtime,mname, muser_id, busy, status, resource_event_id, private, rrule, `cal_events`.background, `cal_events`.files_folder_id, read_only, category_id, exception_for_event_id, recurrence_id, is_organizer,event_type,busy,recurrence,rrule_events FROM cal_events INNER JOIN `cal_calendars` ON (`cal_calendars`.`id`=`cal_events`.`calendar_id`) WHERE 1=1 $where ";
|
||||
|
||||
$res = $dbcal->query($sql);
|
||||
if ($dbcal->num_rows($res)) {
|
||||
|
||||
while ($data = $dbcal->fetch_array($res)) {
|
||||
if ($data['categories']) {
|
||||
$categories = json_decode($data['categories'], true);
|
||||
} else {
|
||||
$categories = [];
|
||||
}
|
||||
unset($byweekday);
|
||||
$rrule = false;
|
||||
if ($attachments[$data['uuid']]) {
|
||||
@@ -173,7 +178,7 @@ class CalendarModel
|
||||
$attachmentLinks = "";
|
||||
}
|
||||
if ($data['all_day_event'] == 1) {
|
||||
if (strpos($data['name'], "Bereitschaft") === false && strpos($data['name'], "Blocker") === false) {
|
||||
if (in_array("Feiertag", $categories)) {
|
||||
continue;
|
||||
}
|
||||
$starttime = date("Y-m-d", $data['start_time']);
|
||||
@@ -190,6 +195,7 @@ class CalendarModel
|
||||
|
||||
if ($data['recurrence']) {
|
||||
$recurrence = json_decode($data['recurrence'], true);
|
||||
$rrule_events= json_decode($data['rrule_events'], true);
|
||||
if ($rrulefreq[$recurrence['pattern']['type']]) {
|
||||
unset ($byweekday);
|
||||
$freq = $rrulefreq[$recurrence['pattern']['type']];
|
||||
@@ -220,6 +226,7 @@ class CalendarModel
|
||||
}
|
||||
} else {
|
||||
$rrule = false;
|
||||
$rrule_events = false;
|
||||
}
|
||||
|
||||
if ($calendarColors[$data['calendar_id']]['bgcolor']) {
|
||||
@@ -245,7 +252,9 @@ class CalendarModel
|
||||
'rights' => array('rights' => $rights, 'order' => $rights),
|
||||
'location' => array('location' => $data['location']),
|
||||
'busy' => array('busy' => $data['busy']),
|
||||
'allDay' => array('allDay' => $data['all_day_event']),
|
||||
'rrule' => array('rrule' => $rrule),
|
||||
'rrule_events' => array('rrule_events' => $rrule_events),
|
||||
'duration' => array('duration' => $duration),
|
||||
'event_type' => array('event_type' => $data['event_type']),
|
||||
'description' => array('description' => ($data['description'])),
|
||||
|
||||
Reference in New Issue
Block a user