From 0c07adfa5210e599a46de2391bba2c87ccf46927 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Mon, 8 Mar 2004 12:52:51 +0000 Subject: [PATCH] Filter entries with invalid date SVN revision: 817 --- src/elogd.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/elogd.c b/src/elogd.c index 6f8ff7ec..3a513e02 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.284 2004/03/08 12:52:51 midas + Filter entries with invalid date + Revision 1.283 2004/03/08 09:41:23 midas Substitutions now also work with 'preset test' @@ -11925,6 +11928,12 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n) for (i = 0; i < lbs->n_attr; i++) if (attr_flags[i] & AF_DATE) { + /* remove entry if no valid date */ + if (atoi(attrib[i]) == 0) { + msg_list[index].lbs = NULL; + continue; + } + sprintf(str, "%da", i); ltime = retrieve_date(str, TRUE); if (ltime > 0 && atoi(attrib[i]) > 0 && atoi(attrib[i]) < ltime) {