fix(UI): use legitimate sorting value

This commit is contained in:
Hivert Quentin
2026-09-03 14:42:51 +02:00
parent 10dc173349
commit d089c4046f
4 changed files with 30 additions and 3 deletions
+8 -1
View File
@@ -786,12 +786,19 @@ static NSArray *tasksFields = nil;
- (void) saveSortValue: (NSString *) submodule
{
NSString *sort, *ascending;
NSArray *sortValues;
SOGoUserSettings *us;
NSMutableDictionary *calendarSettings;
sort = [[context request] formValueForKey: @"sort"];
ascending = [[context request] formValueForKey: @"asc"];
if ([sort length])
//Check value of sorting
sortValues = [NSArray arrayWithObjects: @"title", @"location",
@"calendarName", @"start", @"priority", @"category", @"status", @"end", nil];
if ([sort length] && [sortValues containsObject:sort])
{
us = [[context activeUser] userSettings];
calendarSettings = [us objectForKey: @"Calendar"];