Skip to content

Commit

Permalink
(fix) properly update the last-modified attribute (fixes #4313)
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed Mar 15, 2018
1 parent a0bf8b6 commit a601ed4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -2,6 +2,7 @@
------------------

Bug fixes
- [core] properly update the last-modified attribute (#4313)
- [web] prevent deletion of special folders using del key
- [eas] improved alarms syncing with EAS devices (#4351)

Expand Down
7 changes: 5 additions & 2 deletions SoObjects/Appointments/SOGoAppointmentObject.m
Expand Up @@ -323,7 +323,8 @@ - (void) _removeEventFromUID: (NSString *) theUID
[event addToExceptionDates: recurrenceId];

[event increaseSequence];

[event setLastModified: [NSCalendarDate calendarDate]];

// We save the updated iCalendar in the database.
[object saveCalendar: calendar];
}
Expand Down Expand Up @@ -1242,6 +1243,7 @@ - (NSException *) _updateAttendee: (iCalPerson *) attendee
}

// We save the updated iCalendar in the database.
[event setLastModified: [NSCalendarDate calendarDate]];
error = [eventObject saveCalendar: [event parent]];
}

Expand Down Expand Up @@ -1638,7 +1640,8 @@ - (NSException *) changeParticipationStatus: (NSString *) _status
{
[event addToAlarms: alarm];
}


[event setLastModified: [NSCalendarDate calendarDate]];
ex = [self saveCalendar: [event parent]];
}
}
Expand Down
1 change: 1 addition & 0 deletions SoObjects/Appointments/SOGoCalendarComponent.m
Expand Up @@ -687,6 +687,7 @@ - (NSException *) saveCalendar: (iCalCalendar *) newCalendar

- (NSException *) saveComponent: (iCalRepeatableEntityObject *) newObject
{
[newObject setLastModified: [NSCalendarDate calendarDate]];
return [self saveCalendar: [newObject parent]];
}

Expand Down
1 change: 0 additions & 1 deletion UI/Scheduler/UIxAppointmentActions.m
Expand Up @@ -114,7 +114,6 @@ - (WOResponse *) adjustAction
if ([event hasRecurrenceRules])
[event updateRecurrenceRulesUntilDate: end];

[event setLastModified: [NSCalendarDate calendarDate]];
ex = [co saveComponent: event force: forceSave];

// This condition will be executed only if the event is moved from a calendar to another. If destionationCalendar == 0; there is no calendar change
Expand Down

0 comments on commit a601ed4

Please sign in to comment.