mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-05 20:10:33 +00:00
Preferences saving support
This commit is contained in:
committed by
Francis Lachapelle
parent
2edfd1863b
commit
96d2a4cea8
@@ -1,6 +1,6 @@
|
||||
/* UIxPreferences.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2013 Inverse inc.
|
||||
* Copyright (C) 2007-2015 Inverse inc.
|
||||
*
|
||||
* 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
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
}
|
||||
|
||||
- (NSString *) userLongDateFormat;
|
||||
//- (NSString *) userLongDateFormat;
|
||||
- (BOOL) isSieveServerAvailable;
|
||||
- (id) sieveClient;
|
||||
|
||||
|
||||
@@ -58,14 +58,6 @@
|
||||
|
||||
#import "UIxPreferences.h"
|
||||
|
||||
#warning this class is not finished
|
||||
/* remaining:
|
||||
default event length
|
||||
default snooze length
|
||||
refresh calendar every X minutes
|
||||
workweek = from -> to
|
||||
identities */
|
||||
|
||||
static NSArray *reminderItems = nil;
|
||||
static NSArray *reminderValues = nil;
|
||||
|
||||
@@ -1889,7 +1881,24 @@ static NSArray *reminderValues = nil;
|
||||
|
||||
- (id <WOActionResults>) saveAction
|
||||
{
|
||||
//return [self responseWithStatus: 200 andJSONRepresentation: data];
|
||||
SOGoUser *user;
|
||||
id o, v;
|
||||
|
||||
o = [[[context request] contentAsString] objectFromJSONString];
|
||||
user = [[self context] activeUser];
|
||||
|
||||
if ((v = [o objectForKey: @"defaults"]))
|
||||
{
|
||||
[[[user userDefaults] source] setValues: v];
|
||||
[[user userDefaults] synchronize];
|
||||
}
|
||||
|
||||
if ((v = [o objectForKey: @"settings"]))
|
||||
{
|
||||
[[[user userSettings] source] setValues: v];
|
||||
[[user userSettings] synchronize];
|
||||
}
|
||||
|
||||
return [self responseWithStatus: 200];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user