From f860ca6d9d965ffe38bcd5d28d6b34745e04cc0c Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Fri, 29 Apr 2005 20:04:51 +0000 Subject: [PATCH] Implemented 'case sensitive search' flag SVN revision: 1337 --- doc/config.html | 9 ++++++++- src/elogd.c | 13 ++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/config.html b/doc/config.html index 5a6ae1a6..af56d34a 100755 --- a/doc/config.html +++ b/doc/config.html @@ -1,4 +1,4 @@ - +\ ELOG - Syntax of elogd.cfg @@ -1789,6 +1789,13 @@ useful for set-ups where some attributed must be changed later, but the text body should be preserved. The default is 0.

+

  • Case sensitive search = 0|1 +
    +This switch has two meanings. First, it defines the default state of the +Case sensitive check box in the "Find" page. Second, it determines +if the quick filters are case sensitive or not. The default is 0. +

    +


    diff --git a/src/elogd.c b/src/elogd.c index 3fc6cb49..9c654e42 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.639 2005/04/29 20:04:51 ritt + Implemented 'case sensitive search' flag + Revision 1.638 2005/04/27 10:43:43 ritt Applied patch from Emiliano to fix possible buffer overflow @@ -9615,7 +9618,11 @@ void show_find_form(LOGBOOK * lbs) rsprintf("\n"); rsprintf("\n"); rsprintf("\n", loc("Search text also in attributes")); - rsprintf("\n"); + + if (getcfg(lbs->name, "Case sensitive search", str, sizeof(str)) && atoi(str)) + rsprintf("\n"); + else + rsprintf("\n"); rsprintf("\n", loc("Case sensitive")); rsprintf("\n"); @@ -14860,8 +14867,12 @@ void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands, if (getcfg(lbs->name, "Quick filter", str, sizeof(str))) { rsprintf("\n"); + n = strbreak(str, list, MAX_N_LIST, ","); + if (getcfg(lbs->name, "Case sensitive search", str, sizeof(str)) && atoi(str)) + rsprintf("\n"); + for (index = 0; index < n; index++) { if (strieq(list[index], loc("Date"))) { i = atoi(getparam("last"));