mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-01 11:32:44 +00:00
Monotone-Parent: cbba640dfc6321c0f4565ae72d616bc60cb20407
Monotone-Revision: 1f959c8c87357cf8d3745bf7b492bc7800597701 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-01-16T18:59:58 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -126,7 +126,7 @@ static BOOL sendEMailNotifications = NO;
|
||||
sm = [SoSecurityManager sharedSecurityManager];
|
||||
if (![sm validatePermission: SOGoCalendarPerm_ViewAllComponent
|
||||
onObject: self inContext: context])
|
||||
iCalString = content;
|
||||
iCalString = [record objectForKey: @"c_content"];
|
||||
else if (![sm validatePermission: SOGoCalendarPerm_ViewDAndT
|
||||
onObject: self inContext: context])
|
||||
{
|
||||
@@ -165,7 +165,7 @@ static BOOL sendEMailNotifications = NO;
|
||||
if (secure)
|
||||
iCalString = [self secureContentAsString];
|
||||
else
|
||||
iCalString = content;
|
||||
iCalString = [record objectForKey: @"c_content"];
|
||||
|
||||
if ([iCalString length] > 0)
|
||||
calendar = [iCalCalendar parseSingleFromSource: iCalString];
|
||||
|
||||
@@ -48,8 +48,11 @@
|
||||
|
||||
- (NGVCard *) vCard
|
||||
{
|
||||
NSString *content;
|
||||
|
||||
if (!card)
|
||||
{
|
||||
content = [record objectForKey: @"c_content"];
|
||||
if ([[content uppercaseString] hasPrefix: @"BEGIN:VCARD"])
|
||||
card = [NGVCard parseSingleFromSource: content];
|
||||
else
|
||||
|
||||
@@ -104,7 +104,7 @@ static NSString *AgenorShareLoginMarker = @".-.";
|
||||
/* first check attributes directly bound to the application */
|
||||
if ((obj = [super lookupName:_key inContext:_ctx acquire:NO]))
|
||||
return obj;
|
||||
|
||||
|
||||
if (![self isInHomeFolderBranchOfLoggedInAccount: userLogin]) {
|
||||
[self warnWithFormat:@ "User %@ tried to access mail hierarchy of %@",
|
||||
userLogin, [container nameInContainer]];
|
||||
|
||||
@@ -850,7 +850,7 @@ static BOOL debugSoParts = NO;
|
||||
}
|
||||
else
|
||||
clazz = Nil;
|
||||
|
||||
|
||||
return [clazz objectWithName:_key inContainer: self];
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
@interface SOGoContentObject : SOGoObject
|
||||
{
|
||||
NSString *ocsPath;
|
||||
NSString *content;
|
||||
NSDictionary *record;
|
||||
BOOL isNew;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
if ((self = [super initWithName: newName inContainer: newContainer]))
|
||||
{
|
||||
ocsPath = nil;
|
||||
content = [[self ocsFolder] fetchContentWithName: newName];
|
||||
[content retain];
|
||||
isNew = (!content);
|
||||
record = [[self ocsFolder] recordOfEntryWithName: newName];
|
||||
[record retain];
|
||||
isNew = (!record);
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -59,19 +59,11 @@
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[content release];
|
||||
[record release];
|
||||
[ocsPath release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* notifications */
|
||||
|
||||
- (void) sleep
|
||||
{
|
||||
[content release]; content = nil;
|
||||
[super sleep];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (BOOL) isFolderish
|
||||
@@ -136,19 +128,25 @@
|
||||
|
||||
- (NSString *) contentAsString
|
||||
{
|
||||
return content;
|
||||
return [record objectForKey: @"c_content"];
|
||||
}
|
||||
|
||||
- (NSException *) saveContentString: (NSString *) newContent
|
||||
baseVersion: (unsigned int) newBaseVersion
|
||||
{
|
||||
/* Note: "iCal multifolder saves" are implemented in the apt subclass! */
|
||||
GCSFolder *folder;
|
||||
GCSFolder *folder;
|
||||
NSException *ex;
|
||||
NSMutableDictionary *newRecord;
|
||||
|
||||
ex = nil;
|
||||
|
||||
ASSIGN (content, newContent);
|
||||
if (record)
|
||||
newRecord = [NSMutableDictionary dictionaryWithDictionary: record];
|
||||
else
|
||||
newRecord = [NSMutableDictionary dictionary];
|
||||
[newRecord setObject: newContent forKey: @"c_content"];
|
||||
ASSIGN (record, newRecord);
|
||||
|
||||
folder = [container ocsFolder];
|
||||
if (folder)
|
||||
@@ -307,7 +305,7 @@
|
||||
folder = [self ocsFolder];
|
||||
if (folder)
|
||||
{
|
||||
versionValue = [folder versionOfContentWithName: [self nameInContainer]];
|
||||
versionValue = [record objectForKey: @"c_version"];
|
||||
sprintf (buf, "\"gcs%08d\"", [versionValue unsignedIntValue]);
|
||||
entityTag = [NSString stringWithCString: buf];
|
||||
}
|
||||
@@ -325,7 +323,7 @@
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
|
||||
date = [[self ocsFolder] creationDateOfEntryWithName: nameInContainer];
|
||||
date = [record objectForKey: @"c_creationdate"];
|
||||
|
||||
return [date rfc822DateString];
|
||||
}
|
||||
@@ -334,16 +332,19 @@
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
|
||||
date = [[self ocsFolder] lastModificationOfEntryWithName: nameInContainer];
|
||||
date = [record objectForKey: @"c_lastmodified"];
|
||||
|
||||
return [date rfc822DateString];
|
||||
}
|
||||
|
||||
- (NSString *) davContentLength
|
||||
{
|
||||
NSString *content;
|
||||
|
||||
content = [record objectForKey: @"c_content"];
|
||||
|
||||
return [NSString stringWithFormat: @"%u",
|
||||
[content
|
||||
lengthOfBytesUsingEncoding: NSISOLatin1StringEncoding]];
|
||||
[content lengthOfBytesUsingEncoding: NSISOLatin1StringEncoding]];
|
||||
}
|
||||
|
||||
- (NSException *) davMoveToTargetObject: (id) _target
|
||||
|
||||
Reference in New Issue
Block a user