From 6da03bc75ca64a79785001897eb629b6250b2cb8 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Sat, 28 Jun 2014 08:31:07 -0400 Subject: [PATCH] Cleaned up code for older gcc --- UI/Scheduler/UIxCalListingActions.m | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/UI/Scheduler/UIxCalListingActions.m b/UI/Scheduler/UIxCalListingActions.m index b7c1eddc7..2a579be5f 100644 --- a/UI/Scheduler/UIxCalListingActions.m +++ b/UI/Scheduler/UIxCalListingActions.m @@ -1,9 +1,6 @@ /* UIxCalListingActions.m - this file is part of SOGo * - * Copyright (C) 2006-2011 Inverse inc. - * - * Author: Wolfgang Sourdeau - * Francis Lachapelle + * Copyright (C) 2006-2014 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 @@ -1210,21 +1207,23 @@ _computeBlocksPosition (NSArray *blocks) - (WOResponse *) activeTasksAction { - SOGoAppointmentFolders *co; - SOGoAppointmentFolder *folder; - NSArray *folders; - NSNumber *tasksCount, *foldersCount; - NSString *calendarID; NSMutableDictionary *activeTasksByCalendars; + SOGoAppointmentFolder *folder; + SOGoAppointmentFolders *co; + NSArray *folders; + + int i; co = [self clientObject]; folders = [co subFolders]; - foldersCount = [folders count]; - activeTasksByCalendars = [NSMutableDictionary dictionaryWithCapacity:foldersCount]; - for (folder in folders) { - tasksCount = [folder activeTasks]; - calendarID = [folder nameInContainer]; - [activeTasksByCalendars setObject:tasksCount forKey:calendarID]; + activeTasksByCalendars = [NSMutableDictionary dictionaryWithCapacity: [folders count]]; + + for (i = 0; i < [folders count]; i++) + { + folder = [folders objectAtIndex: i]; + + [activeTasksByCalendars setObject: [folder activeTasks] + forKey: [folder nameInContainer]]; } return [self _responseWithData: activeTasksByCalendars];