Fixed 'pippo-bug' of 'list display' option

SVN revision: 1391
This commit is contained in:
2005-06-04 08:52:15 +00:00
parent c5baa8760d
commit e309e0e7a2
2 changed files with 14 additions and 3 deletions
+4 -1
View File
@@ -940,7 +940,10 @@ an additional colums with the logbook name of each entry is added in front.
<br>
Same as <code><b>List display</b></code>, but for guest access (user level
access with password, but not logged in). Please see also <code><b>Guest
display</b></code>.
display</b></code>. In addition to <code><b>List display</b></code>, one can
optionally specify <code><b>Text</b></code> as an attribute here. Without that
attribute, the summary text of the entry body is not shown. This makes it possible
to show the text for registered users and hide it for guest access.
<p>
<LI><b><code>Link display = &lt;list&gt;</code></b>
+10 -2
View File
@@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG
$Log$
Revision 1.675 2005/06/04 08:52:15 ritt
Fixed 'pippo-bug' of 'list display' option
Revision 1.674 2005/05/27 12:39:17 ritt
Applied patch from Emiliano
@@ -16264,7 +16267,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf
sort_attr[MAX_N_ATTR + 4][NAME_LENGTH], mode_cookie[80];
char *p, *pt, *pt1, *pt2, *slist, *svalue, *gattr, line[1024], iattr[256];
BOOL show_attachments, threaded, csv, xml, raw, mode_commands, expand, filtering, disp_filter,
show_text, searched, found, disp_attr_link[MAX_N_ATTR + 4];
show_text, text_in_attr, searched, found, disp_attr_link[MAX_N_ATTR + 4];
time_t ltime, ltime_start, ltime_end, now, ltime1, ltime2;
struct tm tms, *ptms;
MSG_LIST *msg_list;
@@ -17364,6 +17367,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf
size = printable ? 2 : 3;
show_text = TRUE;
text_in_attr = FALSE;
list[0] = 0;
getcfg(lbs->name, "List display", list, 10000);
@@ -17381,11 +17385,15 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf
if (n > 0 && j == n)
show_text = FALSE;
else
text_in_attr = TRUE;
}
if (list[0]) {
n_attr_disp = strbreak(list, disp_attr, MAX_N_ATTR, ",");
if (show_text)
/* if text is in guest display list, adjust number of *real* attributes */
if (text_in_attr)
n_attr_disp--;
if (search_all) {