diff --git a/SoObjects/SOGo/SOGoDefaults.plist b/SoObjects/SOGo/SOGoDefaults.plist index f9bb2fef0..a3f09d602 100644 --- a/SoObjects/SOGo/SOGoDefaults.plist +++ b/SoObjects/SOGo/SOGoDefaults.plist @@ -13,6 +13,7 @@ SOGoZipPath = "/usr/bin/zip"; SOGoEncryptionKey = "MySOGoEncryptionKey"; + SOGoFolderEncoding = "UTF-7"; WOUseRelativeURLs = YES; WOMessageUseUTF8 = YES; diff --git a/SoObjects/SOGo/SOGoSystemDefaults.h b/SoObjects/SOGo/SOGoSystemDefaults.h index 3678516ff..24d7e4baf 100644 --- a/SoObjects/SOGo/SOGoSystemDefaults.h +++ b/SoObjects/SOGo/SOGoSystemDefaults.h @@ -42,6 +42,7 @@ - (BOOL) trustProxyAuthentication; - (NSString *) encryptionKey; - (BOOL) useRelativeURLs; +- (NSString *) folderEncoding; - (BOOL) isWebAccessEnabled; - (BOOL) isCalendarDAVAccessEnabled; diff --git a/SoObjects/SOGo/SOGoSystemDefaults.m b/SoObjects/SOGo/SOGoSystemDefaults.m index 52a35f868..53e67e108 100644 --- a/SoObjects/SOGo/SOGoSystemDefaults.m +++ b/SoObjects/SOGo/SOGoSystemDefaults.m @@ -356,6 +356,12 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict, return [self boolForKey: @"WOUseRelativeURLs"]; } +- (NSString *) folderEncoding +{ + return [self stringForKey: @"SOGoFolderEncoding"]; +} + + - (BOOL) isWebAccessEnabled { return [self boolForKey: @"SOGoWebAccessEnabled"]; diff --git a/UI/PreferencesUI/UIxFilterEditor.m b/UI/PreferencesUI/UIxFilterEditor.m index f6fe59d2b..964ff44b6 100644 --- a/UI/PreferencesUI/UIxFilterEditor.m +++ b/UI/PreferencesUI/UIxFilterEditor.m @@ -28,6 +28,7 @@ #import #import #import +#import #import @@ -35,6 +36,7 @@ { NSString *filterId; NSDictionary *labels; + NSString *folderEncoding; } @end @@ -112,4 +114,9 @@ return [labels jsonRepresentation]; } +- (NSString *) folderEncoding +{ + return [[SOGoSystemDefaults sharedSystemDefaults] folderEncoding]; +} + @end diff --git a/UI/Templates/PreferencesUI/UIxFilterEditor.wox b/UI/Templates/PreferencesUI/UIxFilterEditor.wox index f6f88ef06..952188e47 100644 --- a/UI/Templates/PreferencesUI/UIxFilterEditor.wox +++ b/UI/Templates/PreferencesUI/UIxFilterEditor.wox @@ -13,6 +13,7 @@ >
diff --git a/UI/WebServerResources/UIxFilterEditor.js b/UI/WebServerResources/UIxFilterEditor.js index 3d38c5da1..16d5960c0 100644 --- a/UI/WebServerResources/UIxFilterEditor.js +++ b/UI/WebServerResources/UIxFilterEditor.js @@ -635,8 +635,12 @@ function ensureMailboxArgRepresentation(container, argumentSpan) { : {'displayName': 'INBOX', 'path': 'INBOX' }); for (var i = 0; i < mailboxes.length; i++) { var mailbox = mailboxes[i]; + var folderValue; + ((folderEncoding == "UTF-8") ? folderValue = mailbox.displayName + : folderValue = mailbox.path); + var mboxOption = createElement("option", null, null, - { value: mailbox.path }, null, select); + { value: folderValue }, null, select); mboxOption.appendChild(document.createTextNode(mailbox.displayName)); } argumentSpan.appendChild(select);