mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Evaluate 'preset xxx' on re-edit
SVN revision: 656
This commit is contained in:
parent
e3c4c196a4
commit
5065df4e15
13
src/elogd.c
13
src/elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.177 2004/01/09 14:21:56 midas
|
||||||
|
Evaluate 'preset xxx' on re-edit
|
||||||
|
|
||||||
Revision 1.176 2004/01/09 14:09:41 midas
|
Revision 1.176 2004/01/09 14:09:41 midas
|
||||||
Added 'last submission' option
|
Added 'last submission' option
|
||||||
|
|
||||||
@ -1700,11 +1703,11 @@ int getcfg_cond(char *group, char *condition, char *param, char *value)
|
|||||||
|
|
||||||
sprintf(str, "{%s}%s", condition, param);
|
sprintf(str, "{%s}%s", condition, param);
|
||||||
if (getcfg(group, str, value))
|
if (getcfg(group, str, value))
|
||||||
return 1;
|
return 2;
|
||||||
|
|
||||||
sprintf(str, "{%s} %s", condition, param);
|
sprintf(str, "{%s} %s", condition, param);
|
||||||
if (getcfg(group, str, value))
|
if (getcfg(group, str, value))
|
||||||
return 1;
|
return 2;
|
||||||
|
|
||||||
return getcfg(group, param, value);
|
return getcfg(group, param, value);
|
||||||
}
|
}
|
||||||
@ -5499,8 +5502,10 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
|
|
||||||
/* check for preset string */
|
/* check for preset string */
|
||||||
sprintf(str, "Preset %s", attr_list[index]);
|
sprintf(str, "Preset %s", attr_list[index]);
|
||||||
if (getcfg_cond(lbs->name, condition, str, preset)) {
|
if ((i = getcfg_cond(lbs->name, condition, str, preset)) > 0) {
|
||||||
if (!bedit) {
|
|
||||||
|
if (!bedit || (breedit && i == 2)) { /* subst on reedit only if preset is under condition */
|
||||||
|
|
||||||
i = build_subst_list(lbs, slist, svalue, NULL);
|
i = build_subst_list(lbs, slist, svalue, NULL);
|
||||||
strsubst(preset, slist, svalue, i);
|
strsubst(preset, slist, svalue, i);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user