mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-21 23:12:40 +00:00
Monotone-Parent: 995b68ade85d0d884cdf8f6fc87e55f0c376a80c
Monotone-Revision: 61fe02b6c3bc4f0aa3797d661d014d8c256b0de9 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-12-30T20:39:07 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
486f0f7ad1
commit
4ba4c622bc
39 files changed
+2041
-1540
No files matched your search
@@ -29,6 +29,7 @@
|
||||
#import <NGStreams/NGActiveSocket.h>
|
||||
#import <Contacts/SOGoContactFolder.h>
|
||||
#import <Contacts/SOGoContactFolders.h>
|
||||
#import <Contacts/NSString+LDIF.h>
|
||||
#import <SOGo/SOGoProductLoader.h>
|
||||
#import <SOGo/SOGoUserFolder.h>
|
||||
#import <SOGo/NSDictionary+Utilities.h>
|
||||
@@ -120,13 +121,13 @@ Class SOGoContactSourceFolderKlass = Nil;
|
||||
value = [entry objectForKey: key];
|
||||
if ([value isKindOfClass: [NSString class]] && [value length] > 0)
|
||||
{
|
||||
if ([value _isLDIFSafe])
|
||||
[result appendFormat: @"%@: %@\n",
|
||||
[key substringFromIndex: 2], value];
|
||||
else
|
||||
if ([value mustEncodeLDIFValue])
|
||||
[result appendFormat: @"%@:: %@\n",
|
||||
[key substringFromIndex: 2],
|
||||
[value stringByEncodingBase64]];
|
||||
else
|
||||
[result appendFormat: @"%@: %@\n",
|
||||
[key substringFromIndex: 2], value];
|
||||
}
|
||||
}
|
||||
[result appendString: @"\n"];
|
||||
|
||||
@@ -37,11 +37,12 @@
|
||||
#import <SOGo/SOGoUserManager.h>
|
||||
#import <SOGo/LDAPSource.h>
|
||||
#import <SOGo/NSArray+Utilities.h>
|
||||
#import <SOGo/NSDictionary+Utilities.h>
|
||||
#import <SOGo/SOGoProductLoader.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
#import <SOGo/SOGoUserProfile.h>
|
||||
#import <SOGo/SOGoUserSettings.h>
|
||||
#import <Contacts/NSDictionary+LDIF.h>
|
||||
|
||||
#import "SOGoTool.h"
|
||||
|
||||
@@ -61,6 +62,12 @@
|
||||
|
||||
@implementation SOGoToolBackup
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
[[SOGoProductLoader productLoader]
|
||||
loadProducts: [NSArray arrayWithObject: @"Contacts.SOGo"]];
|
||||
}
|
||||
|
||||
+ (NSString *) command
|
||||
{
|
||||
return @"backup";
|
||||
@@ -376,7 +383,7 @@
|
||||
userEntry = [currentSource lookupContactEntry: uid];
|
||||
if (userEntry)
|
||||
{
|
||||
[userRecord setObject: [userEntry userRecordAsLDIFEntry]
|
||||
[userRecord setObject: [userEntry ldifRecordAsString]
|
||||
forKey: @"ldif_record"];
|
||||
done = YES;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user