merge of '31bc4f6b49316e2603b7496cfee3b18fdd5e490f'

and '5244339e45ef9095573b10733228f85b81a17377'

Monotone-Parent: 31bc4f6b49316e2603b7496cfee3b18fdd5e490f
Monotone-Parent: 5244339e45ef9095573b10733228f85b81a17377
Monotone-Revision: 4437a82e041d016710ea3a45d8b7cf5b6341afff

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-10-13T21:08:25
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2009-10-13 21:08:25 +00:00
23 changed files with 67 additions and 80 deletions

View File

@@ -8,6 +8,21 @@
_handleAttendee:withDelegate:ownerUser:statusChange:inEvent:):
added proper initialization of variable.
2009-10-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/LDAPSource.m (-dealloc): we release the
"searchAttributes" ivar, even though LDAPSource instances are
never deallocated.
* SoObjects/Mailer/SOGoMailObject+Draft.m (-contentForEditing):
"keys" must be autoreleased to avoid a leak.
* UI/Common/UIxAclEditor.m (-setUserUIDs): we need to retain the
array of user ids to avoid a zombie.
* UI/Common/UIxPageFrame.m (-dealloc): we release
additionalCSSFiles to avoid a leak.
2009-10-12 Ludovic Marcotte <lmarcotte@inverse.ca>
* Updated patchset to support properly windows-1250

View File

@@ -1,3 +1,9 @@
2009-10-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* GCSFolder.m (_tableRequirementForFields:andOrQualifier:): fixed
a double release of "allFields" occuring in the rare case where
the amount of fields would be 0.
2009-09-10 Cyril Robert <crobert@inverse.ca>
* GCSFolder.m (deleteAllContent): New method to delete everything in the

View File

@@ -295,7 +295,7 @@ static NSArray *contentFieldNames = nil;
unsigned int fieldCount;
requirement = noTableRequired;
allFields = [NSMutableArray new];
allFields = [NSMutableArray array];
if ([fields count])
[allFields addObjectsFromArray: fields];
quFields = [[qualifier allQualifierKeys] allObjects];
@@ -314,13 +314,8 @@ static NSArray *contentFieldNames = nil;
requirement |= quickTableRequired;
}
else
{
[allFields release];
[NSException raise: @"GCSFolderMissingFieldNames"
format: @"No field specified for query"];
}
[allFields release];
[NSException raise: @"GCSFolderMissingFieldNames"
format: @"No field specified for query"];
return requirement;
}
@@ -456,7 +451,7 @@ static NSArray *contentFieldNames = nil;
[sql appendString: [self storeTableName]];
}
whereSql = [NSMutableArray new];
whereSql = [NSMutableArray array];
if (qualifier)
{
whereString = [NSString stringWithFormat: @"(%@)",
@@ -476,7 +471,6 @@ static NSArray *contentFieldNames = nil;
if ([whereSql count])
[sql appendFormat: @" WHERE %@",
[whereSql componentsJoinedByString: @" AND "]];
[whereSql release];
sortOrderings = [spec sortOrderings];
if ([sortOrderings count] > 0)

View File

@@ -165,8 +165,7 @@
attrValues = [attributes objectForCaseInsensitiveKey: anAttribute];
if (!attrValues)
{
attrValues = [NSMutableArray new];
[attrValues autorelease];
attrValues = [NSMutableArray array];
[attributes setObject: attrValues forKey: anAttribute];
}
@@ -362,8 +361,7 @@
attrValues = [attributes objectForCaseInsensitiveKey: anAttribute];
if (!attrValues)
{
attrValues = [NSMutableArray new];
[attrValues autorelease];
attrValues = [NSMutableArray array];
[attributes setObject: attrValues forKey: anAttribute];
}

View File

@@ -61,7 +61,7 @@
if (![anElement isVoid])
{
rendering = [NSMutableString new];
rendering = [NSMutableString string];
if ([anElement group])
[rendering appendFormat: @"%@.", [anElement group]];
tag = [anElement tag];
@@ -113,7 +113,6 @@
[rendering appendString: @"\r\n"];
finalRendering = [rendering foldedForVersitCards];
[rendering release];
}
else
finalRendering = @"";
@@ -128,8 +127,7 @@
NSMutableString *rendering;
NSString *groupTag;
rendering = [NSMutableString new];
[rendering autorelease];
rendering = [NSMutableString string];
groupTag = [aGroup tag];
if (!(groupTag && [groupTag length]))

View File

@@ -813,7 +813,7 @@
if (removeDelegate)
{
delegates = [NSMutableArray new];
delegates = [NSMutableArray array];
while (otherDelegate)
{
@@ -846,7 +846,6 @@
[self sendReceiptEmailUsingTemplateNamed: @"Deletion"
forObject: event
to: delegates];
[delegates release];
}
if (addDelegate)
@@ -939,7 +938,7 @@
NSMutableArray *element;
NSDictionary *code;
element = [NSMutableArray new];
element = [NSMutableArray array];
[element addObject: davElementWithContent (@"recipient", XMLNS_CALDAV,
recipient)];
[element addObject: davElementWithContent (@"request-status",
@@ -947,7 +946,6 @@
@"2.0;Success")];
code = davElementWithContent (@"response", XMLNS_CALDAV,
element);
[element release];
return code;
}

View File

@@ -327,10 +327,10 @@
NSMutableArray *response, *props;
NSDictionary *keyTuple;
response = [NSMutableArray new];
response = [NSMutableArray array];
[response addObject: davElementWithContent (@"href", XMLNS_WEBDAV,
[collection davURL])];
props = [NSMutableArray new];
props = [NSMutableArray array];
max = [properties count];
for (count = 0; count < max; count++)
{
@@ -360,8 +360,6 @@
props))];
[responses addObject: davElementWithContent (@"response", XMLNS_WEBDAV,
response)];
[props release];
[response release];
}
- (void) _appendProperties: (NSArray *) properties
@@ -396,16 +394,14 @@
document = [[context request] contentAsDOMDocument];
documentElement = [document documentElement];
matches = [NSMutableDictionary new];
properties = [NSMutableArray new];
matches = [NSMutableDictionary dictionary];
properties = [NSMutableArray array];
[self _fillPrincipalMatches: matches andProperties: properties
fromElement: documentElement];
collections = [self _principalCollectionsMatching: matches];
r = [self _prepareResponseFromContext: queryContext];
[self _appendProperties: properties ofCollections: collections
toResponse: r];
[properties release];
[matches release];
return r;
// @"<D:response><D:href>/SOGo/dav/wsourdeau/</D:href>"

View File

@@ -94,8 +94,7 @@
if ([(NSArray *) ranges count]
&& [(NSArray *) [[ranges objectAtIndex: 0] childNodes] count])
{
filterData = [NSMutableDictionary new];
[filterData autorelease];
filterData = [NSMutableDictionary dictionary];
[filterData setObject: [[(NSArray *)[[ranges objectAtIndex: 0] childNodes] lastObject] data]
forKey: [filterElement attribute: @"name"]];
}

View File

@@ -263,7 +263,7 @@ static BOOL showTextAttachmentsInline = NO;
if ([self _ensureDraftFolderPath])
{
infos = [NSMutableDictionary new];
infos = [NSMutableDictionary dictionary];
[infos setObject: headers forKey: @"headers"];
if (text)
[infos setObject: text forKey: @"text"];
@@ -287,8 +287,6 @@ static BOOL showTextAttachmentsInline = NO;
error = [NSException exceptionWithHTTPStatus:500 /* server error */
reason: @"could not write draft info!"];
}
[infos release];
}
else
{
@@ -470,13 +468,13 @@ static BOOL showTextAttachmentsInline = NO;
NSMutableArray *to, *addrs, *allRecipients;
NSArray *envelopeAddresses, *userEmails;
allRecipients = [NSMutableArray new];
allRecipients = [NSMutableArray array];
userEmails = [[context activeUser] allEmails];
[allRecipients addObjectsFromArray: userEmails];
to = [NSMutableArray arrayWithCapacity: 2];
addrs = [NSMutableArray new];
addrs = [NSMutableArray array];
envelopeAddresses = [_envelope replyTo];
if ([envelopeAddresses count])
[addrs setArray: envelopeAddresses];
@@ -530,9 +528,6 @@ static BOOL showTextAttachmentsInline = NO;
[to release];
}
[allRecipients release];
[addrs release];
}
- (NSArray *) _attachmentBodiesFromPaths: (NSArray *) paths

View File

@@ -213,8 +213,7 @@ static NSString *spoolFolder = nil;
NSArray *result;
NSString *currentFolderName, *prefix;
deepSubfolders = [NSMutableArray new];
[deepSubfolders autorelease];
deepSubfolders = [NSMutableArray array];
prefix = [self absoluteImap4Name];
@@ -1174,12 +1173,12 @@ static NSString *spoolFolder = nil;
- (NSArray *) _sortOrderingsFromSortElement: (DOMElement *) sortElement
{
static NSMutableDictionary *criteriasMap = nil;
NSArray *davSortCriterias;
NSMutableArray *sortOrderings;
SEL sortOrderingOrder;
NSString *davSortVerb, *imapSortVerb;
EOSortOrdering *currentOrdering;
static NSMutableDictionary *criteriasMap = nil;
int count, max;
if (!criteriasMap)

View File

@@ -155,7 +155,7 @@
acceptedTypes
= [NSArray arrayWithObjects: @"text/plain", @"text/html", nil];
keys = [NSMutableArray new];
keys = [NSMutableArray array];
[self addRequiredKeysOfStructure: [self bodyStructure]
path: @"" toArray: keys acceptedTypes: acceptedTypes];

View File

@@ -196,6 +196,7 @@ static NSLock *lock;
[sourceID release];
[modulesConstraints release];
[_scope release];
[searchAttributes release];
[super dealloc];
}

View File

@@ -185,7 +185,7 @@
}
representation = [NSString stringWithFormat: @"[%@]",
[jsonElements componentsJoinedByString: @", "]];
[jsonElements release];
[jsonElements autorelease];
return representation;
}

View File

@@ -444,6 +444,7 @@ static NSArray *childRecordFields = nil;
NSURL *folderLocation;
NSString *sql;
#warning SOGoFolder should have the corresponding method
[displayName release];
displayName = nil;

View File

@@ -161,7 +161,10 @@
- (void) setUserUIDS: (NSString *) retainedUsers
{
if ([retainedUsers length] > 0)
savedUIDs = [retainedUsers componentsSeparatedByString: @","];
{
savedUIDs = [retainedUsers componentsSeparatedByString: @","];
[savedUIDs retain];
}
else
savedUIDs = [NSArray new];
}

View File

@@ -65,10 +65,7 @@
ud = [activeUser userSettings];
moduleSettings = [ud objectForKey: baseFolder];
if (!moduleSettings)
{
moduleSettings = [NSMutableDictionary new];
[moduleSettings autorelease];
}
moduleSettings = [NSMutableDictionary dictionary];
[ud setObject: moduleSettings forKey: baseFolder];
mailInvitationParam

View File

@@ -53,6 +53,7 @@ static NSString *siteFavicon = nil;
title = nil;
toolbar = nil;
additionalJSFiles = nil;
additionalCSSFiles = nil;
}
return self;
@@ -64,6 +65,7 @@ static NSString *siteFavicon = nil;
[title release];
[toolbar release];
[additionalJSFiles release];
[additionalCSSFiles release];
[super dealloc];
}

View File

@@ -67,10 +67,7 @@
ud = [activeUser userSettings];
moduleSettings = [ud objectForKey: module];
if (!moduleSettings)
{
moduleSettings = [NSMutableDictionary new];
[moduleSettings autorelease];
}
moduleSettings = [NSMutableDictionary dictionary];
[ud setObject: moduleSettings forKey: module];
}
@@ -317,8 +314,7 @@
// onObject: contactFolder
// inContext: context] == nil)
folders = [NSMutableArray new];
[folders autorelease];
folders = [NSMutableArray array];
subfolders = [[parentFolder subFolders] objectEnumerator];
while ((subfolder = [subfolders nextObject]))

View File

@@ -48,9 +48,7 @@
{
NSMutableString *cardString;
cardString = [NSMutableString new];
[cardString autorelease];
cardString = [NSMutableString string];
if (value && [value length] > 0)
{
if (label)
@@ -129,7 +127,7 @@
NSString *email, *mailTo;
NSMutableArray *emails;
emails = [NSMutableArray new];
emails = [NSMutableArray array];
mailTo = nil;
[emails addObjectsFromArray: [card childrenWithTag: @"email"]];
@@ -151,8 +149,6 @@
@"%@</a>", email, [card fn], email, email];
}
[emails release];
return [self _cardStringWithLabel: @"Additional Email:"
value: mailTo];
}
@@ -276,8 +272,7 @@
city = [homeAdr value: 3];
prov = [homeAdr value: 4];
data = [NSMutableString new];
[data autorelease];
data = [NSMutableString string];
[data appendString: city];
if ([city length] > 0 && [prov length] > 0)
[data appendString: @", "];
@@ -294,8 +289,7 @@
postalCode = [homeAdr value: 5];
country = [homeAdr value: 6];
data = [NSMutableString new];
[data autorelease];
data = [NSMutableString string];
[data appendString: postalCode];
if ([postalCode length] > 0 && [country length] > 0)
[data appendFormat: @", ", country];
@@ -417,8 +411,7 @@
city = [workAdr value: 3];
prov = [workAdr value: 4];
data = [NSMutableString new];
[data autorelease];
data = [NSMutableString string];
[data appendString: city];
if ([city length] > 0 && [prov length] > 0)
[data appendString: @", "];
@@ -435,8 +428,7 @@
postalCode = [workAdr value: 5];
country = [workAdr value: 6];
data = [NSMutableString new];
[data autorelease];
data = [NSMutableString string];
[data appendString: postalCode];
if ([postalCode length] > 0 && [country length] > 0)
[data appendFormat: @", ", country];
@@ -513,13 +505,13 @@
- (id <WOActionResults>) vcardAction
{
#warning this method is unused
WOResponse *response;
card = [[self clientObject] vCard];
if (card)
{
response = [WOResponse new];
[response autorelease];
response = [context response];
[response setHeader: @"text/vcard" forKey: @"Content-type"];
[response appendContentString: [card versitString]];
}

View File

@@ -26,6 +26,8 @@
#import <NGCards/NGVCard.h>
#import <NGCards/NGVCardReference.h>
#import <SOGo/NSArray+Utilities.h>
#import "UIxListView.h"
@implementation UIxListView

View File

@@ -306,7 +306,7 @@ _xmlCharsetForCharset (NSString *charset)
}
else
{
resultPart = [NSMutableString new];
resultPart = [NSMutableString string];
[resultPart appendFormat: @"<%@", _rawName];
max = [_attributes count];
@@ -353,7 +353,6 @@ _xmlCharsetForCharset (NSString *charset)
[resultPart appendString: @">"];
[result appendString: resultPart];
[resultPart release];
}
}
}

View File

@@ -328,10 +328,7 @@
ud = [[context activeUser] userSettings];
mailSettings = [ud objectForKey: @"Mail"];
if (!mailSettings)
{
mailSettings = [NSMutableDictionary new];
[mailSettings autorelease];
}
mailSettings = [NSMutableDictionary dictionary];
[ud setObject: mailSettings forKey: @"Mail"];
[mailSettings setObject: [co traversalFromMailAccount]
forKey: [NSString stringWithFormat: @"%@Folder",

View File

@@ -751,8 +751,7 @@ static NSArray *udColumnOrder = nil;
NSEnumerator *flags;
NSString *currentFlag;
labels = [NSMutableArray new];
[labels autorelease];
labels = [NSMutableArray array];
flags = [[message objectForKey: @"flags"] objectEnumerator];
while ((currentFlag = [flags nextObject]))