mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-25 16:33:22 +00:00
Monotone-Parent: 48ab3ba04ae37aa55ddec9a67b39c8be57786c6d
Monotone-Revision: 66fc4d9ee925358de80c05092a80e0b39ae6c95d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-11T19:41:40 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -421,36 +421,8 @@ static int attachmentFlagSize = 8096;
|
||||
return [self redirectToLocation:url];
|
||||
}
|
||||
|
||||
/* active message */
|
||||
|
||||
- (SOGoMailObject *) lookupActiveMessage
|
||||
{
|
||||
NSString *uid;
|
||||
|
||||
if ((uid = [[context request] formValueForKey: @"uid"]) == nil)
|
||||
return nil;
|
||||
|
||||
return [[self clientObject] lookupName: uid
|
||||
inContext: context
|
||||
acquire: NO];
|
||||
}
|
||||
|
||||
/* actions */
|
||||
|
||||
- (BOOL) isJavaScriptRequest
|
||||
{
|
||||
return [[[context request] formValueForKey:@"jsonly"] boolValue];
|
||||
}
|
||||
|
||||
- (id) javaScriptOK
|
||||
{
|
||||
WOResponse *r;
|
||||
|
||||
r = [context response];
|
||||
[r setStatus:200 /* OK */];
|
||||
return r;
|
||||
}
|
||||
|
||||
- (int) firstMessageOfPageFor: (int) messageNbr
|
||||
{
|
||||
NSArray *messageNbrs;
|
||||
@@ -523,39 +495,6 @@ static int attachmentFlagSize = 8096;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) viewAction
|
||||
{
|
||||
return [self defaultAction];
|
||||
}
|
||||
|
||||
- (id) markMessageUnreadAction
|
||||
{
|
||||
NSException *error;
|
||||
|
||||
if ((error = [[self lookupActiveMessage] removeFlags:@"seen"]) != nil)
|
||||
// TODO: improve error handling
|
||||
return error;
|
||||
|
||||
if ([self isJavaScriptRequest])
|
||||
return [self javaScriptOK];
|
||||
|
||||
return [self redirectToLocation:@"view"];
|
||||
}
|
||||
|
||||
- (id) markMessageReadAction
|
||||
{
|
||||
NSException *error;
|
||||
|
||||
if ((error = [[self lookupActiveMessage] addFlags:@"seen"]) != nil)
|
||||
// TODO: improve error handling
|
||||
return error;
|
||||
|
||||
if ([self isJavaScriptRequest])
|
||||
return [self javaScriptOK];
|
||||
|
||||
return [self redirectToLocation:@"view"];
|
||||
}
|
||||
|
||||
- (id) getMailAction
|
||||
{
|
||||
// TODO: we might want to flush the caches?
|
||||
|
||||
Reference in New Issue
Block a user