Monotone-Parent: 717b1106bd82a838188f97c4b88f9caa35e59586

Monotone-Revision: 459d0175f983b6e31e8957fa80969a4b335469cb

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-10-03T23:12:11
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-10-03 23:12:11 +00:00
parent 53a1764c22
commit c8778a820d
9 changed files with 158 additions and 63 deletions
+12 -2
View File
@@ -1,6 +1,6 @@
/* SOGoContactLDAPFolder.m - this file is part of SOGo
*
* Copyright (C) 2006 Inverse inc.
* Copyright (C) 2006-2008 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
@@ -24,6 +24,7 @@
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSString.h>
#import <Foundation/NSUserDefaults.h>
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/WOApplication.h>
@@ -187,8 +188,10 @@
NSEnumerator *oldRecords;
NSDictionary *oldRecord;
NSMutableDictionary *newRecord;
NSString *data;
NSString *data, *contactInfo;
NSUserDefaults *ud;
ud = [NSUserDefaults standardUserDefaults];
newRecords = [[NSMutableArray alloc] initWithCapacity: [records count]];
[newRecords autorelease];
@@ -237,6 +240,13 @@
data = @"";
[newRecord setObject: data forKey: @"phone"];
contactInfo = [ud stringForKey: @"SOGoLDAPContactInfoAttribute"];
if ([contactInfo length] > 0) {
data = [oldRecord objectForKey: contactInfo];
if ([data length] > 0)
[newRecord setObject: data forKey: @"contactInfo"];
}
[newRecords addObject: newRecord];
oldRecord = [oldRecords nextObject];
}