From 532d4f025827d329d82d4f59e27648f95f5d0d58 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Mon, 22 Oct 2007 15:26:44 +0000 Subject: [PATCH] Fixed bug with quick filters and boolean attributes SVN revision: 1940 --- src/elogd.c | 77 ++++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index 1105eafc..e7c59059 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -17162,7 +17162,7 @@ void build_ref(char *ref, int size, char *mode, char *expand, char *attach, char void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands, char *mode) { - int cur_exp, n, i, j, i1, i2, index, size; + int cur_exp, n, i, j, i1, i2, index, attr_index, size; char ref[256], str[NAME_LENGTH], comment[NAME_LENGTH], list[MAX_N_LIST][NAME_LENGTH], option[NAME_LENGTH]; rsprintf("\n"); @@ -17319,6 +17319,15 @@ void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands, rsprintf("\n"); for (index = 0; index < n; index++) { + /* find according attribute index */ + for (attr_index = 0; attr_index < lbs->n_attr; attr_index++) + if (strieq(list[index], attr_list[attr_index])) + break; + if (attr_index == lbs->n_attr) { + rsprintf("Error: Attribute \"%s\" for quick filter not found", list[index]); + attr_index = 0; + } + if (strieq(list[index], loc("Date"))) { i = isparam("last") ? atoi(getparam("last")) : 0; @@ -17335,7 +17344,7 @@ void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands, rsprintf("