mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-07 09:25:09 +00:00
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:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user