mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-22 05:38:33 +00:00
Monotone-Parent: b3afbde30d88c6ea366307b2bb45202fe90bd36f
Monotone-Revision: f3553f7157471c92e062fbcc05707ec8f12c2df5 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-09-29T14:36:18 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#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>
|
||||
@@ -188,10 +187,8 @@
|
||||
NSEnumerator *oldRecords;
|
||||
NSDictionary *oldRecord;
|
||||
NSMutableDictionary *newRecord;
|
||||
NSString *data, *contactInfo;
|
||||
NSUserDefaults *ud;
|
||||
NSString *data;
|
||||
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
newRecords = [[NSMutableArray alloc] initWithCapacity: [records count]];
|
||||
[newRecords autorelease];
|
||||
|
||||
@@ -240,13 +237,6 @@
|
||||
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];
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
#import <EOControl/EOControl.h>
|
||||
#import <NGLdap/NGLdapConnection.h>
|
||||
@@ -395,12 +394,8 @@ static int sizeLimit;
|
||||
|
||||
- (NSArray *) _searchAttributes
|
||||
{
|
||||
NSUserDefaults *ud;
|
||||
NSString *contactInfo;
|
||||
|
||||
if (!searchAttributes)
|
||||
{
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
searchAttributes = [NSMutableArray new];
|
||||
if (CNField)
|
||||
[searchAttributes addObject: CNField];
|
||||
@@ -409,12 +404,6 @@ static int sizeLimit;
|
||||
[searchAttributes addObjectsFromArray: mailFields];
|
||||
[searchAttributes addObjectsFromArray: [self _contraintsFields]];
|
||||
[searchAttributes addObjectsFromArray: commonSearchFields];
|
||||
|
||||
// Add SOGoLDAPContactInfoAttribute from user defaults
|
||||
contactInfo = [ud stringForKey: @"SOGoLDAPContactInfoAttribute"];
|
||||
if ([contactInfo length] > 0 &&
|
||||
![searchAttributes containsObject: contactInfo])
|
||||
[searchAttributes addObject: contactInfo];
|
||||
}
|
||||
|
||||
return searchAttributes;
|
||||
|
||||
Reference in New Issue
Block a user