mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Fixed bug that text disappeared upon upload
SVN revision: 662
This commit is contained in:
parent
7fc141cbcf
commit
b744bdb107
27
src/elogd.c
27
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.181 2004/01/12 08:37:17 midas
|
||||||
|
Fixed bug that text disappeared upon upload
|
||||||
|
|
||||||
Revision 1.180 2004/01/09 22:56:00 midas
|
Revision 1.180 2004/01/09 22:56:00 midas
|
||||||
Implemented expansion in logbook selection page
|
Implemented expansion in logbook selection page
|
||||||
|
|
||||||
@ -5219,7 +5222,7 @@ BOOL is_cond_attr(index)
|
|||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
|
|
||||||
void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL breedit)
|
void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL bupload, BOOL breedit)
|
||||||
{
|
{
|
||||||
int i, j, n, index, size, width, height, fh, length, first, input_size, input_maxlen,
|
int i, j, n, index, size, width, height, fh, length, first, input_size, input_maxlen,
|
||||||
format_flags;
|
format_flags;
|
||||||
@ -5243,7 +5246,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
|
|
||||||
text[0] = 0;
|
text[0] = 0;
|
||||||
|
|
||||||
if (breedit) {
|
if (breedit || bupload) {
|
||||||
/* get date from parameter */
|
/* get date from parameter */
|
||||||
if (*getparam("entry_date"))
|
if (*getparam("entry_date"))
|
||||||
strcpy(date, getparam("entry_date"));
|
strcpy(date, getparam("entry_date"));
|
||||||
@ -5401,7 +5404,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* subst attributes for edits */
|
/* subst attributes for edits */
|
||||||
if (message_id && bedit && !breedit) {
|
if (message_id && bedit && !breedit && !bupload) {
|
||||||
for (index = 0; index < lbs->n_attr; index++) {
|
for (index = 0; index < lbs->n_attr; index++) {
|
||||||
sprintf(str, "Subst on edit %s", attr_list[index]);
|
sprintf(str, "Subst on edit %s", attr_list[index]);
|
||||||
if (getcfg_cond(lbs->name, condition, str, preset)) {
|
if (getcfg_cond(lbs->name, condition, str, preset)) {
|
||||||
@ -5774,7 +5777,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
/* hidden text for original message */
|
/* hidden text for original message */
|
||||||
rsprintf("<input type=hidden name=reply_to value=\"%d\">\n", message_id);
|
rsprintf("<input type=hidden name=reply_to value=\"%d\">\n", message_id);
|
||||||
|
|
||||||
if (breedit)
|
if (breedit || bupload)
|
||||||
/* hidden text for original message */
|
/* hidden text for original message */
|
||||||
rsprintf("<input type=hidden name=reply_to value=\"%s\">\n", getparam("reply_to"));
|
rsprintf("<input type=hidden name=reply_to value=\"%s\">\n", getparam("reply_to"));
|
||||||
|
|
||||||
@ -5793,7 +5796,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
|
|
||||||
if (text[0]) {
|
if (text[0]) {
|
||||||
if (bedit) {
|
if (bedit) {
|
||||||
if (!breedit && !getcfg_cond(lbs->name, condition, "Preset text", str))
|
if (bupload || (breedit && !getcfg_cond(lbs->name, condition, "Preset text", str)))
|
||||||
rsputs(text);
|
rsputs(text);
|
||||||
} else {
|
} else {
|
||||||
if (!getcfg_cond(lbs->name, condition, "Quote on reply", str)
|
if (!getcfg_cond(lbs->name, condition, "Quote on reply", str)
|
||||||
@ -12255,6 +12258,8 @@ void interprete(char *lbook, char *path)
|
|||||||
|
|
||||||
if (!equal_ustring(str, "top group"))
|
if (!equal_ustring(str, "top group"))
|
||||||
show_selection_page(NULL);
|
show_selection_page(NULL);
|
||||||
|
|
||||||
|
/* top group present and no top group in URL -> abort connection */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12569,13 +12574,13 @@ void interprete(char *lbook, char *path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (equal_ustring(command, loc("New"))) {
|
if (equal_ustring(command, loc("New"))) {
|
||||||
show_edit_form(lbs, 0, FALSE, FALSE, FALSE);
|
show_edit_form(lbs, 0, FALSE, FALSE, FALSE, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
message_id = atoi(dec_path);
|
message_id = atoi(dec_path);
|
||||||
if (equal_ustring(command, loc("Upload"))) {
|
if (equal_ustring(command, loc("Upload"))) {
|
||||||
show_edit_form(lbs, atoi(getparam("edit_id")), FALSE, TRUE, TRUE);
|
show_edit_form(lbs, atoi(getparam("edit_id")), FALSE, TRUE, TRUE, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12600,25 +12605,25 @@ void interprete(char *lbook, char *path)
|
|||||||
unsetparam(str);
|
unsetparam(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
show_edit_form(lbs, atoi(getparam("edit_id")), FALSE, TRUE, TRUE);
|
show_edit_form(lbs, atoi(getparam("edit_id")), FALSE, TRUE, TRUE, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (equal_ustring(command, loc("Edit"))) {
|
if (equal_ustring(command, loc("Edit"))) {
|
||||||
if (message_id) {
|
if (message_id) {
|
||||||
show_edit_form(lbs, message_id, FALSE, TRUE, FALSE);
|
show_edit_form(lbs, message_id, FALSE, TRUE, FALSE, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (equal_ustring(command, loc("Reply"))) {
|
if (equal_ustring(command, loc("Reply"))) {
|
||||||
show_edit_form(lbs, message_id, TRUE, FALSE, FALSE);
|
show_edit_form(lbs, message_id, TRUE, FALSE, FALSE, FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (equal_ustring(command, loc("Update"))) {
|
if (equal_ustring(command, loc("Update"))) {
|
||||||
show_edit_form(lbs, atoi(getparam("edit_id")), FALSE, TRUE, TRUE);
|
show_edit_form(lbs, atoi(getparam("edit_id")), FALSE, TRUE, FALSE, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user