mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 03:15:25 +00:00
Merge branch 'master' into fix-some-warnings
Conflicts: SoObjects/Appointments/SOGoAppointmentObject.m
This commit is contained in:
@@ -437,6 +437,13 @@ vtodo_class2 = "(Confidential task)";
|
||||
"When I modify my calendar, send a mail to" = "When I modify my calendar, send a mail to";
|
||||
"Email Address" = "Email Address";
|
||||
"Export" = "Export";
|
||||
|
||||
/* Show only the calendar for which the menu is displayed */
|
||||
"Show Only This Calendar" = "Show Only This Calendar";
|
||||
|
||||
/* Show all calendar (personal, subscriptions and web) */
|
||||
"Show All Calendars" = "Show All Calendars";
|
||||
|
||||
"Links to this Calendar" = "Links to this Calendar";
|
||||
"Authenticated User Access" = "Authenticated User Access";
|
||||
"CalDAV URL" = "CalDAV URL ";
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* UIxAppointmentActions.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2010 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2010-2016 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* UIxAppointmentActions.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2011-2014 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2011-2016 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -65,6 +63,7 @@
|
||||
NSException *ex;
|
||||
SOGoAppointmentFolder *targetCalendar, *sourceCalendar;
|
||||
SOGoAppointmentFolders *folders;
|
||||
BOOL forceSave;
|
||||
|
||||
rq = [context request];
|
||||
params = [[rq contentAsString] objectFromJSONString];
|
||||
@@ -73,6 +72,7 @@
|
||||
startDelta = [params objectForKey: @"start"];
|
||||
durationDelta = [params objectForKey: @"duration"];
|
||||
destionationCalendar = [params objectForKey: @"destination"];
|
||||
forceSave = NO;
|
||||
|
||||
if (daysDelta || startDelta || durationDelta)
|
||||
{
|
||||
@@ -116,7 +116,8 @@
|
||||
[event updateRecurrenceRulesUntilDate: end];
|
||||
|
||||
[event setLastModified: [NSCalendarDate calendarDate]];
|
||||
ex = [co saveComponent: event];
|
||||
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
|
||||
if ([destionationCalendar length] > 0)
|
||||
{
|
||||
@@ -135,12 +136,21 @@
|
||||
ex = [co moveToFolder: targetCalendar];
|
||||
}
|
||||
}
|
||||
|
||||
if (ex)
|
||||
{
|
||||
unsigned int httpStatus;
|
||||
|
||||
httpStatus = 500;
|
||||
|
||||
if ([ex respondsToSelector: @selector(httpStatus)])
|
||||
httpStatus = [ex httpStatus];
|
||||
|
||||
jsonResponse = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[ex reason], @"message",
|
||||
[ex reason], @"message",
|
||||
nil];
|
||||
response = [self responseWithStatus: 403
|
||||
|
||||
response = [self responseWithStatus: httpStatus
|
||||
andJSONRepresentation: jsonResponse];
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* UIxAppointmentEditor.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2015 Inverse inc.
|
||||
* Copyright (C) 2007-2016 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* UIxAppointmentEditor.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2015 Inverse inc.
|
||||
* Copyright (C) 2007-2016 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -454,7 +454,9 @@
|
||||
SOGoAppointmentObject *co;
|
||||
SoSecurityManager *sm;
|
||||
WORequest *request;
|
||||
|
||||
unsigned int httpStatus;
|
||||
BOOL forceSave;
|
||||
|
||||
event = [self event];
|
||||
co = [self clientObject];
|
||||
@@ -475,6 +477,7 @@
|
||||
else
|
||||
{
|
||||
[self setAttributes: params];
|
||||
forceSave = NO;
|
||||
|
||||
if ([event hasRecurrenceRules])
|
||||
[self _adjustRecurrentRules];
|
||||
@@ -498,12 +501,12 @@
|
||||
}
|
||||
|
||||
// Save the event.
|
||||
ex = [co saveComponent: event];
|
||||
ex = [co saveComponent: event force: forceSave];
|
||||
}
|
||||
else
|
||||
{
|
||||
// The event was modified -- save it.
|
||||
ex = [co saveComponent: event];
|
||||
ex = [co saveComponent: event force: forceSave];
|
||||
|
||||
if (componentCalendar
|
||||
&& ![[componentCalendar ocsPath]
|
||||
@@ -526,9 +529,12 @@
|
||||
if (ex)
|
||||
{
|
||||
httpStatus = 500;
|
||||
|
||||
if ([ex respondsToSelector: @selector(httpStatus)])
|
||||
httpStatus = [ex httpStatus];
|
||||
|
||||
jsonResponse = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"failure", @"status",
|
||||
[ex reason], @"message",
|
||||
[ex reason], @"message",
|
||||
nil];
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user