dovecot-2.2: fts: Replace '-' with '_' in filter-specific fts_fi...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Apr 24 10:11:57 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/26d37653d247
changeset: 18470:26d37653d247
user: Timo Sirainen <tss at iki.fi>
date: Fri Apr 24 13:10:17 2015 +0300
description:
fts: Replace '-' with '_' in filter-specific fts_filters_* settings.
So for example using fts_filters_normalizer_icu instead of
fts_filters_normalizer-icu.
diffstat:
src/plugins/fts/fts-user.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r cf3c7bcbbdd9 -r 26d37653d247 src/plugins/fts/fts-user.c
--- a/src/plugins/fts/fts-user.c Fri Apr 24 13:08:16 2015 +0300
+++ b/src/plugins/fts/fts-user.c Fri Apr 24 13:10:17 2015 +0300
@@ -54,7 +54,7 @@
{
const struct fts_filter *filter_class;
struct fts_filter *filter = NULL, *parent = NULL;
- const char *filters_key, *const *filters;
+ const char *filters_key, *const *filters, *filter_set_name;
const char *str, *error, *set_key, *const *settings;
unsigned int i;
int ret = 0;
@@ -81,11 +81,12 @@
}
/* try the language-specific setting first */
+ filter_set_name = t_str_replace(filters[i], '-', '_');
set_key = t_strdup_printf("fts_filters_%s_%s",
- lang->name, filters[i]);
+ lang->name, filter_set_name);
str = mail_user_plugin_getenv(user, set_key);
if (str == NULL) {
- set_key = t_strdup_printf("fts_filters_%s", filters[i]);
+ set_key = t_strdup_printf("fts_filters_%s", filter_set_name);
str = mail_user_plugin_getenv(user, set_key);
}
settings = str == NULL ? NULL : t_strsplit_spaces(str, " ");
More information about the dovecot-cvs
mailing list