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("