Kalender Update
* Richtigstellung Calender Filter Events
This commit is contained in:
@@ -207,12 +207,10 @@ class CalendarModel
|
||||
if ($visibleCalendarTypes) {
|
||||
$where .= " AND event_type IN (" . implode(",", $visibleCalendarTypes) . ")";
|
||||
}
|
||||
if ($r->visibleCancellation != 1) {
|
||||
if ($r->visibleCancellation && $r->visibleCancellation != 1) {
|
||||
$where .= " AND canceld = '0' ";
|
||||
|
||||
}
|
||||
|
||||
|
||||
$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 ORDER BY start_time DESC";
|
||||
|
||||
$res = $dbcal->query($sql);
|
||||
|
||||
@@ -1013,15 +1013,13 @@ if (typeof (EventSource) !== 'undefined') {
|
||||
}
|
||||
});
|
||||
jsondata = JSON.parse(e.data);
|
||||
|
||||
jsondata.forEach(function (event) {
|
||||
if (!visibleCalendars.includes(parseInt(event.calendar_id))) {
|
||||
return;
|
||||
}
|
||||
if (visibleCalendarTypes.length > 0 && !visibleCalendarTypes.includes(parseInt(event.event_type))) {
|
||||
if (visibleCalendarTypes.length > 0 && !visibleCalendarTypes.includes(parseInt(event.event_type)) && event.change_type != '3') {
|
||||
return;
|
||||
}
|
||||
|
||||
let cevent = calendar.getEventById(event.cal_events_id);
|
||||
let rights = false;
|
||||
let movable = false;
|
||||
|
||||
Reference in New Issue
Block a user