(fix) fixed Apple Calendar creation (fixes #4813)
parent
7ff9921709
commit
e866fd5fda
1
NEWS
1
NEWS
|
@ -9,6 +9,7 @@ Enhancements
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
- [core] use the supplied Sieve creds to fetch the IMAP4 separator (#4846)
|
- [core] use the supplied Sieve creds to fetch the IMAP4 separator (#4846)
|
||||||
|
- [core] fixed Apple Calendar creation (#4813)
|
||||||
|
|
||||||
|
|
||||||
4.1.0 (2019-10-24)
|
4.1.0 (2019-10-24)
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* SOGoAppointmentFolderObject.m - this file is part of SOGo
|
/* SOGoAppointmentFolderObject.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2012 Inverse inc.
|
* Copyright (C) 2010-2019 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -476,12 +476,19 @@ static NSArray *childRecordFields = nil;
|
||||||
NSException *error;
|
NSException *error;
|
||||||
|
|
||||||
if ([newName length])
|
if ([newName length])
|
||||||
|
{
|
||||||
|
NS_DURING
|
||||||
{
|
{
|
||||||
[self renameTo: newName];
|
[self renameTo: newName];
|
||||||
error = nil;
|
error = nil;
|
||||||
}
|
}
|
||||||
|
NS_HANDLER
|
||||||
|
error = [NSException exceptionWithHTTPStatus: 409
|
||||||
|
reason: @"Existing name"];
|
||||||
|
NS_ENDHANDLER;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
error = [NSException exceptionWithHTTPStatus: 400
|
error = [NSException exceptionWithHTTPStatus: 403
|
||||||
reason: @"Empty string"];
|
reason: @"Empty string"];
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
|
@ -645,6 +652,12 @@ static NSArray *childRecordFields = nil;
|
||||||
|
|
||||||
- (void) renameTo: (NSString *) newName
|
- (void) renameTo: (NSString *) newName
|
||||||
{
|
{
|
||||||
|
if (!displayName)
|
||||||
|
[self displayName];
|
||||||
|
|
||||||
|
if ([displayName isEqualToString: newName])
|
||||||
|
return;
|
||||||
|
|
||||||
#warning SOGoFolder should have the corresponding method
|
#warning SOGoFolder should have the corresponding method
|
||||||
[displayName release];
|
[displayName release];
|
||||||
displayName = nil;
|
displayName = nil;
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
o = [params objectForKey: @"name"];
|
o = [params objectForKey: @"name"];
|
||||||
if ([o isKindOfClass: [NSString class]] && ![o isEqualToString: [addressbook displayName]])
|
if ([o isKindOfClass: [NSString class]])
|
||||||
[addressbook renameTo: o];
|
[addressbook renameTo: o];
|
||||||
|
|
||||||
o = [params objectForKey: @"synchronize"];
|
o = [params objectForKey: @"synchronize"];
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
o = [params objectForKey: @"name"];
|
o = [params objectForKey: @"name"];
|
||||||
if ([o isKindOfClass: [NSString class]] && ![o isEqualToString: [calendar displayName]])
|
if ([o isKindOfClass: [NSString class]])
|
||||||
[calendar renameTo: o];
|
[calendar renameTo: o];
|
||||||
|
|
||||||
o = [params objectForKey: @"color"];
|
o = [params objectForKey: @"color"];
|
||||||
|
|
Loading…
Reference in New Issue