Made 'subst <attrib> = $<attrib>' work correctly

SVN revision: 792
This commit is contained in:
Stefan Ritt 2004-02-25 10:22:22 +00:00
parent 6ab37e5a24
commit c63024399c

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.263 2004/02/25 10:22:22 midas
Made 'subst <attrib> = $<attrib>' work correctly
Revision 1.262 2004/02/24 19:05:16 midas Revision 1.262 2004/02/24 19:05:16 midas
Removed javaEnabled() Removed javaEnabled()
@ -12873,9 +12876,6 @@ void submit_elog(LOGBOOK * lbs)
strcpy(att_file[i], getparam(str)); strcpy(att_file[i], getparam(str));
} }
/* compile substitution list */
n = build_subst_list(lbs, slist, svalue, NULL);
/* retrieve attributes */ /* retrieve attributes */
for (i = 0; i < lbs->n_attr; i++) { for (i = 0; i < lbs->n_attr; i++) {
@ -12935,6 +12935,13 @@ void submit_elog(LOGBOOK * lbs)
*strchr(attrib[i], '{') = 0; *strchr(attrib[i], '{') = 0;
} }
}
/* compile substitution list */
n = build_subst_list(lbs, slist, svalue, attrib);
/* substitute attributes */
for (i = 0; i < lbs->n_attr; i++) {
if (!*getparam("edit_id")) { if (!*getparam("edit_id")) {
sprintf(str, "Subst %s", attr_list[i]); sprintf(str, "Subst %s", attr_list[i]);
if (getcfg(lbs->name, str, subst_str)) { if (getcfg(lbs->name, str, subst_str)) {