(fix) fixed Apple Calendar creation (fixes #4813)
parent
7ff9921709
commit
e866fd5fda
1
NEWS
1
NEWS
|
@ -9,6 +9,7 @@ Enhancements
|
|||
|
||||
Bug fixes
|
||||
- [core] use the supplied Sieve creds to fetch the IMAP4 separator (#4846)
|
||||
- [core] fixed Apple Calendar creation (#4813)
|
||||
|
||||
|
||||
4.1.0 (2019-10-24)
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* SOGoAppointmentFolderObject.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2010-2012 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2010-2019 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
|
||||
|
|
|
@ -378,7 +378,7 @@ static SoSecurityManager *sm = nil;
|
|||
methodSel = SOGoSelectorForPropertySetter (currentName);
|
||||
if ([newFolder respondsToSelector: methodSel])
|
||||
[newFolder performSelector: methodSel
|
||||
withObject: value];
|
||||
withObject: value];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -477,11 +477,18 @@ static NSArray *childRecordFields = nil;
|
|||
|
||||
if ([newName length])
|
||||
{
|
||||
[self renameTo: newName];
|
||||
error = nil;
|
||||
NS_DURING
|
||||
{
|
||||
[self renameTo: newName];
|
||||
error = nil;
|
||||
}
|
||||
NS_HANDLER
|
||||
error = [NSException exceptionWithHTTPStatus: 409
|
||||
reason: @"Existing name"];
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
error = [NSException exceptionWithHTTPStatus: 400
|
||||
error = [NSException exceptionWithHTTPStatus: 403
|
||||
reason: @"Empty string"];
|
||||
|
||||
return error;
|
||||
|
@ -645,6 +652,12 @@ static NSArray *childRecordFields = nil;
|
|||
|
||||
- (void) renameTo: (NSString *) newName
|
||||
{
|
||||
if (!displayName)
|
||||
[self displayName];
|
||||
|
||||
if ([displayName isEqualToString: newName])
|
||||
return;
|
||||
|
||||
#warning SOGoFolder should have the corresponding method
|
||||
[displayName release];
|
||||
displayName = nil;
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
NS_DURING
|
||||
{
|
||||
o = [params objectForKey: @"name"];
|
||||
if ([o isKindOfClass: [NSString class]] && ![o isEqualToString: [addressbook displayName]])
|
||||
if ([o isKindOfClass: [NSString class]])
|
||||
[addressbook renameTo: o];
|
||||
|
||||
o = [params objectForKey: @"synchronize"];
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
NS_DURING
|
||||
{
|
||||
o = [params objectForKey: @"name"];
|
||||
if ([o isKindOfClass: [NSString class]] && ![o isEqualToString: [calendar displayName]])
|
||||
if ([o isKindOfClass: [NSString class]])
|
||||
[calendar renameTo: o];
|
||||
|
||||
o = [params objectForKey: @"color"];
|
||||
|
|
Loading…
Reference in New Issue