Merge pull request #223 from inverse-inc/v2

SOGo v2.3.4
This commit is contained in:
Enrique J. Hernández
2015-12-29 22:41:02 +01:00
299 changed files with 5366 additions and 11083 deletions
+29 -25
View File
@@ -513,31 +513,6 @@ convention:
flattenedValuesForKey: @""]
inLDIFRecord: ldifRecord];
elements = [self childrenWithTag: @"adr"
andAttribute: @"type" havingValue: @"work"];
if (elements && [elements count] > 0)
{
element = [elements objectAtIndex: 0];
[self _setValue: @"mozillaworkstreet2"
to: [element flattenedValueAtIndex: 1 forKey: @""]
inLDIFRecord: ldifRecord];
[self _setValue: @"street"
to: [element flattenedValueAtIndex: 2 forKey: @""]
inLDIFRecord: ldifRecord];
[self _setValue: @"l"
to: [element flattenedValueAtIndex: 3 forKey: @""]
inLDIFRecord: ldifRecord];
[self _setValue: @"st"
to: [element flattenedValueAtIndex: 4 forKey: @""]
inLDIFRecord: ldifRecord];
[self _setValue: @"postalcode"
to: [element flattenedValueAtIndex: 5 forKey: @""]
inLDIFRecord: ldifRecord];
[self _setValue: @"c"
to: [element flattenedValueAtIndex: 6 forKey: @""]
inLDIFRecord: ldifRecord];
}
elements = [self childrenWithTag: @"adr"
andAttribute: @"type" havingValue: @"home"];
if (elements && [elements count] > 0)
@@ -563,6 +538,35 @@ convention:
inLDIFRecord: ldifRecord];
}
elements = [self childrenWithTag: @"adr"
andAttribute: @"type" havingValue: @"work"];
if (!elements || [elements count] == 0)
elements = [self childrenWithTag: @"adr"];
if (elements && [elements count] > 0)
{
element = [elements objectAtIndex: 0];
[self _setValue: @"mozillaworkstreet2"
to: [element flattenedValueAtIndex: 1 forKey: @""]
inLDIFRecord: ldifRecord];
[self _setValue: @"street"
to: [element flattenedValueAtIndex: 2 forKey: @""]
inLDIFRecord: ldifRecord];
[self _setValue: @"l"
to: [element flattenedValueAtIndex: 3 forKey: @""]
inLDIFRecord: ldifRecord];
[self _setValue: @"st"
to: [element flattenedValueAtIndex: 4 forKey: @""]
inLDIFRecord: ldifRecord];
[self _setValue: @"postalcode"
to: [element flattenedValueAtIndex: 5 forKey: @""]
inLDIFRecord: ldifRecord];
[self _setValue: @"c"
to: [element flattenedValueAtIndex: 6 forKey: @""]
inLDIFRecord: ldifRecord];
}
elements = [self childrenWithTag: @"url"];
[self _setValue: @"mozillaworkurl"
to: [self _simpleValueForType: @"work" inArray: elements
+2 -11
View File
@@ -47,7 +47,6 @@
#import <SOGo/NSObject+DAV.h>
#import <SOGo/SOGoPermissions.h>
#import <SOGo/SOGoSource.h>
#import <SOGo/SOGoUserManager.h>
#import <SOGo/SOGoUserSettings.h>
#import <SOGo/SOGoSystemDefaults.h>
#import <SOGo/WORequest+SOGo.h>
@@ -227,16 +226,8 @@
NSObject <SOGoSource> *recordSource;
newRecord = [NSMutableDictionary dictionaryWithCapacity: 8];
// We set the c_uid only for authentication sources. SOGoUserSources set
// with canAuthenticate = NO and isAddressBook = YES have absolutely *NO REASON*
// to have entries with a c_uid. These can collide with real uids.
if ([[[[SOGoUserManager sharedUserManager] metadataForSourceID: [source sourceID]] objectForKey: @"canAuthenticate"] boolValue])
{
[newRecord setObject: [oldRecord objectForKey: @"c_uid"]
forKey: @"c_uid"];
}
[newRecord setObject: [oldRecord objectForKey: @"c_uid"]
forKey: @"c_uid"];
[newRecord setObject: [oldRecord objectForKey: @"c_name"]
forKey: @"c_name"];