Fixed indent
This commit is contained in:
parent
6da03bc75c
commit
ff015afde8
|
@ -74,7 +74,7 @@ static NSArray *reminderValues = nil;
|
||||||
if (!reminderItems && !reminderValues)
|
if (!reminderItems && !reminderValues)
|
||||||
{
|
{
|
||||||
reminderItems = [NSArray arrayWithObjects:
|
reminderItems = [NSArray arrayWithObjects:
|
||||||
@"5_MINUTES_BEFORE",
|
@"5_MINUTES_BEFORE",
|
||||||
@"10_MINUTES_BEFORE",
|
@"10_MINUTES_BEFORE",
|
||||||
@"15_MINUTES_BEFORE",
|
@"15_MINUTES_BEFORE",
|
||||||
@"30_MINUTES_BEFORE",
|
@"30_MINUTES_BEFORE",
|
||||||
|
@ -90,7 +90,7 @@ static NSArray *reminderValues = nil;
|
||||||
@"1_WEEK_BEFORE",
|
@"1_WEEK_BEFORE",
|
||||||
nil];
|
nil];
|
||||||
reminderValues = [NSArray arrayWithObjects:
|
reminderValues = [NSArray arrayWithObjects:
|
||||||
@"-PT5M",
|
@"-PT5M",
|
||||||
@"-PT10M",
|
@"-PT10M",
|
||||||
@"-PT15M",
|
@"-PT15M",
|
||||||
@"-PT30M",
|
@"-PT30M",
|
||||||
|
@ -704,18 +704,18 @@ static NSArray *reminderValues = nil;
|
||||||
BOOL collectedAlreadyExist;
|
BOOL collectedAlreadyExist;
|
||||||
|
|
||||||
contactFolders = [[[context activeUser] homeFolderInContext: context]
|
contactFolders = [[[context activeUser] homeFolderInContext: context]
|
||||||
lookupName: @"Contacts"
|
lookupName: @"Contacts"
|
||||||
inContext: context
|
inContext: context
|
||||||
acquire: NO];
|
acquire: NO];
|
||||||
folders = [NSMutableArray arrayWithArray: [contactFolders subFolders]];
|
folders = [NSMutableArray arrayWithArray: [contactFolders subFolders]];
|
||||||
count = [folders count]-1;
|
count = [folders count]-1;
|
||||||
|
|
||||||
// Inside this loop we remove all the public or shared addressbooks
|
// Inside this loop we remove all the public or shared addressbooks
|
||||||
for (; count >= 0; count--)
|
for (; count >= 0; count--)
|
||||||
{
|
{
|
||||||
if (![[folders objectAtIndex: count] isKindOfClass: [SOGoContactGCSFolder class]])
|
if (![[folders objectAtIndex: count] isKindOfClass: [SOGoContactGCSFolder class]])
|
||||||
[folders removeObjectAtIndex: count];
|
[folders removeObjectAtIndex: count];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse the objects in order to have only the displayName of the addressbooks to be displayed on the preferences interface
|
// Parse the objects in order to have only the displayName of the addressbooks to be displayed on the preferences interface
|
||||||
availableAddressBooksID = [NSMutableArray arrayWithCapacity: [folders count]];
|
availableAddressBooksID = [NSMutableArray arrayWithCapacity: [folders count]];
|
||||||
|
@ -723,27 +723,29 @@ static NSArray *reminderValues = nil;
|
||||||
count = [folders count]-1;
|
count = [folders count]-1;
|
||||||
collectedAlreadyExist = NO;
|
collectedAlreadyExist = NO;
|
||||||
|
|
||||||
for (i = 0; i <= count ; i++) {
|
for (i = 0; i <= count ; i++)
|
||||||
[availableAddressBooksID addObject:[[folders objectAtIndex:i] realNameInContainer]];
|
{
|
||||||
[availableAddressBooksName addObject:[[folders objectAtIndex:i] displayName]];
|
[availableAddressBooksID addObject:[[folders objectAtIndex:i] realNameInContainer]];
|
||||||
|
[availableAddressBooksName addObject:[[folders objectAtIndex:i] displayName]];
|
||||||
if ([[availableAddressBooksID objectAtIndex:i] isEqualToString: @"collected"])
|
|
||||||
collectedAlreadyExist = YES;
|
if ([[availableAddressBooksID objectAtIndex:i] isEqualToString: @"collected"])
|
||||||
}
|
collectedAlreadyExist = YES;
|
||||||
|
}
|
||||||
// Create the dictionary for the next function : itemAddressBookText.
|
// Create the dictionary for the next function : itemAddressBookText.
|
||||||
if (!addressBooksIDWithDisplayName)
|
if (!addressBooksIDWithDisplayName)
|
||||||
{
|
{
|
||||||
addressBooksIDWithDisplayName = [[NSMutableDictionary alloc] initWithObjects:availableAddressBooksName
|
addressBooksIDWithDisplayName = [[NSMutableDictionary alloc] initWithObjects:availableAddressBooksName
|
||||||
forKeys:availableAddressBooksID];
|
forKeys:availableAddressBooksID];
|
||||||
}
|
}
|
||||||
if (!collectedAlreadyExist)
|
if (!collectedAlreadyExist)
|
||||||
{
|
{
|
||||||
[availableAddressBooksID addObject: @"collected"];
|
[availableAddressBooksID addObject: @"collected"];
|
||||||
[addressBooksIDWithDisplayName setObject: [self labelForKey: @"Collected Address Book"] forKey: @"collected"];
|
[addressBooksIDWithDisplayName setObject: [self labelForKey: @"Collected Address Book"] forKey: @"collected"];
|
||||||
}
|
}
|
||||||
|
|
||||||
return availableAddressBooksID;
|
return availableAddressBooksID;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) itemAddressBookText
|
- (NSString *) itemAddressBookText
|
||||||
{
|
{
|
||||||
return [addressBooksIDWithDisplayName objectForKey: item];
|
return [addressBooksIDWithDisplayName objectForKey: item];
|
||||||
|
@ -931,7 +933,7 @@ static NSArray *reminderValues = nil;
|
||||||
capabilities = [[self sieveClient] capabilities];
|
capabilities = [[self sieveClient] capabilities];
|
||||||
else
|
else
|
||||||
capabilities = [NSArray array];
|
capabilities = [NSArray array];
|
||||||
[capabilities retain];
|
[capabilities retain];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [capabilities jsonRepresentation];
|
return [capabilities jsonRepresentation];
|
||||||
|
@ -1222,12 +1224,12 @@ static NSArray *reminderValues = nil;
|
||||||
SOGoSieveManager *manager;
|
SOGoSieveManager *manager;
|
||||||
|
|
||||||
if (!client)
|
if (!client)
|
||||||
{
|
{
|
||||||
folder = [[self clientObject] mailAccountsFolder: @"Mail" inContext: context];
|
folder = [[self clientObject] mailAccountsFolder: @"Mail" inContext: context];
|
||||||
account = [folder lookupName: @"0" inContext: context acquire: NO];
|
account = [folder lookupName: @"0" inContext: context acquire: NO];
|
||||||
manager = [SOGoSieveManager sieveManagerForUser: [context activeUser]];
|
manager = [SOGoSieveManager sieveManagerForUser: [context activeUser]];
|
||||||
client = [[manager clientForAccount: account] retain];
|
client = [[manager clientForAccount: account] retain];
|
||||||
}
|
}
|
||||||
|
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
@ -1275,9 +1277,9 @@ static NSArray *reminderValues = nil;
|
||||||
results = [self responseWithStatus: 502
|
results = [self responseWithStatus: 502
|
||||||
andJSONRepresentation: [NSDictionary dictionaryWithObjectsAndKeys: @"Connection error", @"textStatus", nil]];
|
andJSONRepresentation: [NSDictionary dictionaryWithObjectsAndKeys: @"Connection error", @"textStatus", nil]];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
results = [self responseWithStatus: 503
|
results = [self responseWithStatus: 503
|
||||||
andJSONRepresentation: [NSDictionary dictionaryWithObjectsAndKeys: @"Service temporarily unavailable", @"textStatus", nil]];
|
andJSONRepresentation: [NSDictionary dictionaryWithObjectsAndKeys: @"Service temporarily unavailable", @"textStatus", nil]];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
results = self;
|
results = self;
|
||||||
|
|
Loading…
Reference in a new issue