mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-12 02:11:23 +00:00
merge of '8ac94a78bb2ff47a9c8c93921883f5d1ed948bae'
and '95fd526cbec8bccb226bbd63d3442c7d12061aa3' Monotone-Parent: 8ac94a78bb2ff47a9c8c93921883f5d1ed948bae Monotone-Parent: 95fd526cbec8bccb226bbd63d3442c7d12061aa3 Monotone-Revision: a1ae082f345f010ed0903ee2ac6873682313ca49 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2011-06-17T13:19:18 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2011-06-16 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* UI/Contacts/UIxContactFolderActions.m (importLdifData:):
|
||||
Fixed folded lines import and base64 encoded values. Patch
|
||||
from bug #1251
|
||||
|
||||
2011-06-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreSOGo.m (mapistore_init_backend): accept
|
||||
|
||||
@@ -5,9 +5,5 @@
|
||||
compress
|
||||
delaycompress
|
||||
notifempty
|
||||
create 640 sogo sogo
|
||||
sharedscripts
|
||||
postrotate
|
||||
/etc/init.d/sogod restart > /dev/null
|
||||
endscript
|
||||
copytruncate
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ SOGo_INCLUDE_DIRS += -I.. -I../../UI \
|
||||
-DSOGO_MINOR_VERSION="@\"$(MINOR_VERSION)\"" \
|
||||
-DSOGO_SUBMINOR_VERSION="@\"$(SUBMINOR_VERSION)\""
|
||||
|
||||
HOSTNAME = $(shell hostname -f)
|
||||
HOSTNAME ?= $(shell hostname -f)
|
||||
BUILD_DATE = $(shell echo $$USER@$(HOSTNAME); date +"%Y%m%d%H%M")
|
||||
|
||||
ADDITIONAL_CPPFLAGS += \
|
||||
@@ -21,10 +21,16 @@ SOGo_LIBRARIES_DEPEND_UPON += \
|
||||
-lNGCards \
|
||||
-lNGMime \
|
||||
-lNGStreams -lNGExtensions -lEOControl \
|
||||
-lXmlRpc -lDOM -lSaxObjC -lcrypt \
|
||||
-lXmlRpc -lDOM -lSaxObjC \
|
||||
-lNGLdap -lSBJson \
|
||||
-lGDLContentStore
|
||||
|
||||
ifeq ($(findstring openbsd, $(GNUSTEP_HOST_OS)), openbsd)
|
||||
SOGo_LIBRARIES_DEPEND_UPON += -lcrypto
|
||||
else
|
||||
SOGo_LIBRARIES_DEPEND_UPON += -lcrypt
|
||||
endif
|
||||
|
||||
ADDITIONAL_TOOL_LIBS += \
|
||||
-L$(GNUSTEP_OBJ_DIR)/ \
|
||||
-lSOGo \
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
#import <NGExtensions/NSNull+misc.h>
|
||||
#import <NGExtensions/NGBase64Coding.h>
|
||||
|
||||
#import <Contacts/SOGoContactObject.h>
|
||||
#import <Contacts/SOGoContactFolder.h>
|
||||
@@ -154,30 +155,69 @@
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
SOGoContactLDIFEntry *ldifEntry;
|
||||
entry = [NSMutableDictionary dictionary];
|
||||
NSEnumerator *keyEnumerator;
|
||||
NSMutableDictionary *encodedEntry;
|
||||
encodedEntry = [NSMutableDictionary dictionary];
|
||||
lines = [[ldifContacts objectAtIndex: i]
|
||||
componentsSeparatedByString: @"\n"];
|
||||
|
||||
key = NULL;
|
||||
linesCount = [lines count];
|
||||
for (j = 0; j < linesCount; j++)
|
||||
{
|
||||
components = [[lines objectAtIndex: j]
|
||||
componentsSeparatedByString: @": "];
|
||||
NSString *line;
|
||||
line = [lines objectAtIndex: j];
|
||||
|
||||
/* skip embedded comment lines */
|
||||
if ([line hasPrefix: @"#"])
|
||||
{
|
||||
key = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* handle continuation lines */
|
||||
if ([line hasPrefix: @" "])
|
||||
{
|
||||
if (key != NULL)
|
||||
{
|
||||
value = [[encodedEntry valueForKey: key]
|
||||
stringByAppendingString: [line substringFromIndex: 1]];
|
||||
[encodedEntry setValue: value forKey: key];
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
components = [line componentsSeparatedByString: @": "];
|
||||
if ([components count] == 2)
|
||||
{
|
||||
key = [components objectAtIndex: 0];
|
||||
key = [[components objectAtIndex: 0] lowercaseString];
|
||||
value = [components objectAtIndex: 1];
|
||||
|
||||
if ([key length] == 0)
|
||||
key = @"dn";
|
||||
|
||||
[entry setObject: value forKey: [key lowercaseString]];
|
||||
[encodedEntry setValue: value forKey: key];
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* decode Base64-encoded attributes */
|
||||
entry = [NSMutableDictionary dictionary];
|
||||
keyEnumerator = [encodedEntry keyEnumerator];
|
||||
while ((key = [keyEnumerator nextObject]))
|
||||
{
|
||||
value = [encodedEntry valueForKey: key];
|
||||
if ([key hasSuffix: @":"])
|
||||
{
|
||||
key = [key substringToIndex: [key length] - 1];
|
||||
value = [value stringByDecodingBase64];
|
||||
}
|
||||
[entry setValue: value forKey: key];
|
||||
}
|
||||
|
||||
uid = [folder globallyUniqueObjectId];
|
||||
ldifEntry = [SOGoContactLDIFEntry contactEntryWithName: uid
|
||||
withLDIFEntry: entry
|
||||
|
||||
10
configure
vendored
10
configure
vendored
@@ -37,6 +37,15 @@ else
|
||||
MAKE=gmake
|
||||
fi
|
||||
|
||||
# hostname(1) on some systems may not know the -f parameter
|
||||
hostname -f 2>/dev/null >/dev/null
|
||||
if [ $? -eq 0 ];then
|
||||
HOSTNAME=`hostname -f`
|
||||
else
|
||||
HOSTNAME=`hostname`
|
||||
fi
|
||||
|
||||
|
||||
NGSTREAMS_DIR="./sope-core/NGStreams"
|
||||
LINK_SYSLIBDIRS="-L/usr/local/pgsql/lib -L/usr/local/lib -L/usr/lib"
|
||||
|
||||
@@ -251,6 +260,7 @@ genConfigMake() {
|
||||
cfgwrite "CGS_LIBDIR_NAME:=lib"
|
||||
fi
|
||||
|
||||
cfgwrite "HOSTNAME=${HOSTNAME}"
|
||||
cfgwrite "SOGO_SYSLIBDIR=\${GNUSTEP_LIBRARIES}"
|
||||
cfgwrite "SOGO_LIBDIR=\${GNUSTEP_LIBRARY}/SOGo"
|
||||
cfgwrite "SOGO_TEMPLATESDIR=\${SOGO_LIBDIR}/Templates"
|
||||
|
||||
Reference in New Issue
Block a user