diff --git a/UI/PreferencesUI/English.lproj/Localizable.strings b/UI/PreferencesUI/English.lproj/Localizable.strings index 8bf18c925..859405fad 100644 --- a/UI/PreferencesUI/English.lproj/Localizable.strings +++ b/UI/PreferencesUI/English.lproj/Localizable.strings @@ -447,3 +447,8 @@ /* Limited Animation Mode */ "animation_LIMITED" = "Limited"; "animation_NONE" = "None"; + +/* External Sieve scripts */ +"An external Sieve script is active" = "An external Sieve script is active"; +"Sieve is a programming language that can be used for email filtering. If you let SOGo handle your filters, vacation and forward settings, your active script will be disabled." = "Sieve is a programming language that can be used for email filtering. If you let SOGo handle your filters, vacation and forward settings, your active script will be disabled."; +"Let SOGo handle everything" = "Let SOGo handle everything"; \ No newline at end of file diff --git a/UI/PreferencesUI/UIxPreferences.h b/UI/PreferencesUI/UIxPreferences.h index c09395ea0..361862dc5 100644 --- a/UI/PreferencesUI/UIxPreferences.h +++ b/UI/PreferencesUI/UIxPreferences.h @@ -1,6 +1,6 @@ /* UIxPreferences.h - this file is part of SOGo * - * Copyright (C) 2007-2016 Inverse inc. + * Copyright (C) 2007-2019 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 diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index d0cc3480a..b2e4f38b2 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -728,6 +728,25 @@ static NSArray *reminderValues = nil; return [[user domainDefaults] sieveScriptsEnabled]; } +- (NSString *) hasActiveExternalSieveScripts +{ + NSDictionary *scripts; + NSEnumerator *keys; + NSString *key; + + scripts = [[self _sieveClient] listScripts]; + + keys = [scripts keyEnumerator]; + while ((key = [keys nextObject])) + { + if ([key caseInsensitiveCompare: @"sogo"] != NSOrderedSame && + [[scripts objectForKey: key] boolValue]) + return @"true"; + } + + return @"false"; +} + // // Used by wox template // diff --git a/UI/Templates/PreferencesUI/UIxPreferences.wox b/UI/Templates/PreferencesUI/UIxPreferences.wox index ef4923b6b..127a007b9 100644 --- a/UI/Templates/PreferencesUI/UIxPreferences.wox +++ b/UI/Templates/PreferencesUI/UIxPreferences.wox @@ -23,6 +23,7 @@ var forwardConstraints = ; var forwardConstraintsDomains = ; var sieveCapabilities = ; + var hasActiveExternalSieveScripts = ;