(feat) added photo support for LDAP-based address books
parent
cb960fae02
commit
836fdb1722
|
@ -1232,6 +1232,7 @@ mapping = {
|
||||||
2+h|Other
|
2+h|Other
|
||||||
|Birthday |birthyear-birthmonth-birthday
|
|Birthday |birthyear-birthmonth-birthday
|
||||||
|Note |description
|
|Note |description
|
||||||
|
|Photo |photo
|
||||||
|===
|
|===
|
||||||
|
|
||||||
Authenticating using C.A.S.
|
Authenticating using C.A.S.
|
||||||
|
|
3
NEWS
3
NEWS
|
@ -1,6 +1,9 @@
|
||||||
3.2.3 (2016-12-DD)
|
3.2.3 (2016-12-DD)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
New features
|
||||||
|
- [core] added photo support for LDAP-based address books
|
||||||
|
|
||||||
Enhancements
|
Enhancements
|
||||||
- [web] updated CKEditor to version 4.6.0
|
- [web] updated CKEditor to version 4.6.0
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* NGVCardPhoto.h - this file is part of NGCards
|
/* NGVCardPhoto.h - this file is part of NGCards
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Inverse inc.
|
* Copyright (C) 2010-2016 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* NGCards is free software; you can redistribute it and/or modify it under
|
* NGCards is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the
|
* the terms of the GNU Lesser General Public License as published by the
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* NGVCardPhoto.m - this file is part of NGCards
|
/* NGVCardPhoto.m - this file is part of NGCards
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Inverse inc.
|
* Copyright (C) 2010-2016 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* NGCards is free software; you can redistribute it and/or modify it under
|
* NGCards is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the
|
* the terms of the GNU Lesser General Public License as published by the
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#import <Foundation/NSTimeZone.h>
|
#import <Foundation/NSTimeZone.h>
|
||||||
|
|
||||||
|
#import <NGExtensions/NGBase64Coding.h>
|
||||||
#import <NGExtensions/NSNull+misc.h>
|
#import <NGExtensions/NSNull+misc.h>
|
||||||
|
|
||||||
#import <NGCards/NSArray+NGCards.h>
|
#import <NGCards/NSArray+NGCards.h>
|
||||||
|
@ -358,6 +359,10 @@ convention:
|
||||||
else
|
else
|
||||||
[self setCategories: [o componentsSeparatedByString: @","]];
|
[self setCategories: [o componentsSeparatedByString: @","]];
|
||||||
|
|
||||||
|
// Photo
|
||||||
|
if ([ldifRecord objectForKey: @"photo"])
|
||||||
|
[self setPhoto: [[ldifRecord objectForKey: @"photo"] stringByEncodingBase64]];
|
||||||
|
|
||||||
[self cleanupEmptyChildren];
|
[self cleanupEmptyChildren];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* NSDictionary+LDIF.h - this file is part of SOGo
|
/* NSDictionary+LDIF.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Inverse inc
|
* Copyright (C) 2011-2016 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* NSDictionary+LDIF.m - this file is part of SOGo
|
/* NSDictionary+LDIF.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2012 Inverse inc
|
* Copyright (C) 2011-2016 Inverse inc
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* NSString+LDIF.h - this file is part of SOGo
|
/* NSString+LDIF.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Inverse inc
|
* Copyright (C) 2011-2016 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* NSString+LDIF.m - this file is part of SOGo
|
/* NSString+LDIF.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Inverse inc
|
* Copyright (C) 2011-2016 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* SOGoContactEntryPhoto.h - this file is part of SOGo
|
/* SOGoContactEntryPhoto.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Inverse inc.
|
* Copyright (C) 2010-2016 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* SOGoContactEntryPhoto.m - this file is part of SOGo
|
/* SOGoContactEntryPhoto.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Inverse inc.
|
* Copyright (C) 2010-2016 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* SOGoContactGCSEntry.h - this file is part of SOGo
|
/* SOGoContactGCSEntry.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2014 Inverse inc.
|
* Copyright (C) 2006-2016 Inverse inc.
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* SOGoContactGCSEntry.h - this file is part of SOGo
|
/* SOGoContactGCSEntry.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2014 Inverse inc.
|
* Copyright (C) 2006-2016 Inverse inc.
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* SOGoContactGCSList.h - this file is part of SOGo
|
/* SOGoContactGCSList.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 Inverse inc.
|
* Copyright (C) 2008-2016 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* SOGoContactLDIFEntry.h - this file is part of SOGo
|
/* SOGoContactLDIFEntry.h - this file is part of SOGo
|
||||||
* Copyright (C) 2006-2011 Inverse inc.
|
|
||||||
*
|
*
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
* Copyright (C) 2006-2016 Inverse inc.
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* SOGoContactLDIFEntry.m - this file is part of SOGo
|
/* SOGoContactLDIFEntry.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2014 Inverse inc.
|
* Copyright (C) 2006-2016 Inverse inc.
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
#import <SOGo/SOGoPermissions.h>
|
#import <SOGo/SOGoPermissions.h>
|
||||||
|
|
||||||
#import "NGVCard+SOGo.h"
|
#import "NGVCard+SOGo.h"
|
||||||
|
#import "SOGoContactEntryPhoto.h"
|
||||||
#import "SOGoContactGCSEntry.h"
|
#import "SOGoContactGCSEntry.h"
|
||||||
#import "SOGoContactLDIFEntry.h"
|
#import "SOGoContactLDIFEntry.h"
|
||||||
#import "SOGoContactSourceFolder.h"
|
#import "SOGoContactSourceFolder.h"
|
||||||
|
@ -141,7 +142,7 @@
|
||||||
|
|
||||||
- (BOOL) hasPhoto
|
- (BOOL) hasPhoto
|
||||||
{
|
{
|
||||||
return NO;
|
return ([ldifEntry objectForKey: @"photo"] != nil);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) davEntityTag
|
- (NSString *) davEntityTag
|
||||||
|
@ -227,4 +228,25 @@
|
||||||
return [newContact saveComponent: newCard];
|
return [newContact saveComponent: newCard];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (id) lookupName: (NSString *) lookupName
|
||||||
|
inContext: (id) localContext
|
||||||
|
acquire: (BOOL) acquire
|
||||||
|
{
|
||||||
|
id obj;
|
||||||
|
|
||||||
|
if ([lookupName isEqualToString: @"photo"])
|
||||||
|
{
|
||||||
|
if ([self hasPhoto])
|
||||||
|
obj = [SOGoContactEntryPhoto objectWithName: lookupName
|
||||||
|
inContainer: self];
|
||||||
|
else
|
||||||
|
obj = nil;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
obj = [super lookupName: lookupName inContext: localContext
|
||||||
|
acquire: acquire];
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* SOGoUserFolder+Appointments.h - this file is part of SOGo
|
/* SOGoUserFolder+Appointments.h - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Inverse inc.
|
* Copyright (C) 2009-2016 Inverse inc.
|
||||||
*
|
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify
|
* This file is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1211,7 +1211,6 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
|
||||||
{
|
{
|
||||||
ldapConnection = [self _ldapConnection];
|
ldapConnection = [self _ldapConnection];
|
||||||
qualifier = [self _qualifierForFilter: match];
|
qualifier = [self _qualifierForFilter: match];
|
||||||
// attributes = [self _searchAttributes];
|
|
||||||
attributes = [NSArray arrayWithObject: @"*"];
|
attributes = [NSArray arrayWithObject: @"*"];
|
||||||
|
|
||||||
if ([_scope caseInsensitiveCompare: @"BASE"] == NSOrderedSame)
|
if ([_scope caseInsensitiveCompare: @"BASE"] == NSOrderedSame)
|
||||||
|
@ -1237,10 +1236,9 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
|
||||||
- (NGLdapEntry *) _lookupLDAPEntry: (EOQualifier *) qualifier
|
- (NGLdapEntry *) _lookupLDAPEntry: (EOQualifier *) qualifier
|
||||||
{
|
{
|
||||||
NGLdapConnection *ldapConnection;
|
NGLdapConnection *ldapConnection;
|
||||||
NSArray *attributes;
|
|
||||||
NSEnumerator *entries;
|
NSEnumerator *entries;
|
||||||
|
NSArray *attributes;
|
||||||
|
|
||||||
// attributes = [self _searchAttributes];
|
|
||||||
ldapConnection = [self _ldapConnection];
|
ldapConnection = [self _ldapConnection];
|
||||||
attributes = [NSArray arrayWithObject: @"*"];
|
attributes = [NSArray arrayWithObject: @"*"];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue