Fixed problem with MOptions and elog

SVN revision: 1250
This commit is contained in:
Stefan Ritt 2005-03-16 21:07:43 +00:00
parent 675d22ddbe
commit bb3dd09a16

View File

@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG Contents: Web server program for Electronic Logbook ELOG
$Log$ $Log$
Revision 1.589 2005/03/16 21:07:43 ritt
Fixed problem with MOptions and elog
Revision 1.588 2005/03/14 20:53:23 ritt Revision 1.588 2005/03/14 20:53:23 ritt
Implemented option 'link display' Implemented option 'link display'
@ -16840,6 +16843,10 @@ void submit_elog(LOGBOOK *lbs)
sprintf(str, "%s_%d", ua, j); sprintf(str, "%s_%d", ua, j);
if (getparam(str) && *getparam(str)) if (getparam(str) && *getparam(str))
break; break;
/* check for attributes without the _<i> from elog */
if (getparam(ua) && *getparam(ua))
break;
} }
if (j == MAX_N_LIST) { if (j == MAX_N_LIST) {
@ -16961,23 +16968,28 @@ void submit_elog(LOGBOOK *lbs)
btou(ua); btou(ua);
if (attr_flags[i] & AF_MULTI) { if (attr_flags[i] & AF_MULTI) {
attrib[i][0] = 0;
first = 1; if (getparam(ua) && *getparam(ua)) {
for (j = 0; j < MAX_N_LIST; j++) { strlcpy(attrib[i], getparam(ua), NAME_LENGTH);
sprintf(str, "%s_%d", ua, j); } else {
if (getparam(str)) { attrib[i][0] = 0;
if (*getparam(str)) { first = 1;
if (first) for (j = 0; j < MAX_N_LIST; j++) {
first = 0; sprintf(str, "%s_%d", ua, j);
else if (getparam(str)) {
strlcat(attrib[i], " | ", NAME_LENGTH); if (*getparam(str)) {
if (strlen(attrib[i]) + strlen(getparam(str)) < NAME_LENGTH - 2) if (first)
strlcat(attrib[i], getparam(str), NAME_LENGTH); first = 0;
else else
break; strlcat(attrib[i], " | ", NAME_LENGTH);
} if (strlen(attrib[i]) + strlen(getparam(str)) < NAME_LENGTH - 2)
} else strlcat(attrib[i], getparam(str), NAME_LENGTH);
break; else
break;
}
} else
break;
}
} }
} else if (attr_flags[i] & AF_DATE) { } else if (attr_flags[i] & AF_DATE) {