diff --git a/doc/config.html b/doc/config.html index 53e2c8f0..fd46d12c 100755 --- a/doc/config.html +++ b/doc/config.html @@ -2592,6 +2592,13 @@ Options Location = Main Building{a}, New Building{b}, Old Building{c} This can be handy when locating options from long lists in drop-down boxes in quick filters for example. Default for this setting is 0. +
Allow branching = 0|1diff --git a/src/elogd.c b/src/elogd.c index 77982dbf..af665298 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -9163,6 +9163,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL text = xmalloc(TEXT_SIZE); text[0] = 0; orig_author[0] = 0; + orig_tag[0] = 0; encoding[0] = 0; date[0] = 0; locked_by[0] = 0; @@ -9316,10 +9317,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL sprintf(str, "Preset on first reply %s", attr_list[index]); if ((i = getcfg(lbs->name, str, preset, sizeof(preset))) > 0 && breply) { - - el_retrieve(lbs, message_id, NULL, NULL, NULL, 0, NULL, 0, str, NULL, NULL, NULL, NULL); - - if (str[0] == 0) { + if (orig_tag[0] == 0) { if (!breedit || (breedit && i == 2)) { /* subst on reedit only if preset is under condition */ /* do not format date for date attributes */ @@ -9492,6 +9490,15 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL } } + /* check for non-allowed branching */ + if (breply && getcfg(lbs->name, "Allow branching", str, sizeof(str)) && atoi(str) == 0) { + if (reply_tag[0]) { + show_error("Branches are not allowed in this logbook"); + xfree(text); + return; + } + } + /* check for author */ if (bedit && getcfg(lbs->name, "Restrict edit", str, sizeof(str)) && atoi(str) == 1) { if (!is_author(lbs, attrib, owner)) {