From eb32ebac4918d2b5b9d48fd86c95e921b33e0dc1 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Wed, 5 Mar 2003 20:29:21 +0000 Subject: [PATCH] Fixed status message for copy/move SVN revision: 429 --- src/elogd.c | 48 +++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index 8f89c7dd..2428bf9a 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.39 2003/03/05 20:29:21 midas + Fixed status message for copy/move + Revision 1.38 2003/03/05 07:39:26 midas Only re-read elogd.cfg if changed, using stat() @@ -8150,7 +8153,7 @@ LOGBOOK *lbs_cur; /*---- header ----*/ - show_standard_header(lbs, FALSE, loc("ELOG Entries"), NULL); + show_standard_header(lbs, TRUE, loc("ELOG Entries"), NULL); /*---- title ----*/ @@ -8612,11 +8615,6 @@ LOGBOOK *lbs_cur; if (n_msg == 0) rsprintf("%s", loc("No entries found")); - /*---- select navigation ----*/ - - if (atoi(getparam("select")) == 1) - show_select_navigation(lbs); - /*---- page navigation ----*/ if (!printable) @@ -9080,7 +9078,7 @@ int i, j, n, missing, first, index, mindex, suppress, message_id, resubmit_or void copy_to(LOGBOOK *lbs, int src_id, char *dest_logbook, int move, int orig_id) { -int size, i, n, n_done, n_reply, index, status, fh, source_id, message_id; +int size, i, n, n_done, n_done_reply, n_reply, index, status, fh, source_id, message_id; char str[256], file_name[MAX_PATH_LENGTH], attrib[MAX_N_ATTR][NAME_LENGTH]; char date[80], text[TEXT_SIZE], msg_str[32], in_reply_to[80], reply_to[256], attachment[MAX_ATTACHMENTS][MAX_PATH_LENGTH], encoding[80], *buffer, @@ -9099,7 +9097,7 @@ LOGBOOK *lbs_dest; else n = atoi(getparam("nsel")); - n_done = 0; + n_done = n_done_reply = 0; for (index=0 ; index"); rsprintf("\n"); - if (n>1) + if (n_done == 0) + rsprintf(loc("No message selected")); + else { - if (n_done == 0) - rsprintf(loc("No message selected")); - else if (move) - rsprintf(loc("%d messages moved successfully from \"%s\" to \"%s\""), n_done, lbs->name, lbs_dest->name); + if (n_done == 1) + rsprintf(loc("One message")); else - rsprintf(loc("%d messages copied successfully from \"%s\" to \"%s\""), n_done, lbs->name, lbs_dest->name); - } - else - { + rsprintf(loc("%d messages"), n_done); + + if (n_done_reply) + { + rsprintf(" "); + + if (n_done == 1) + rsprintf(loc("and its replies")); + else + rsprintf(loc("and their replies")); + } + + rsprintf(" "); + if (move) - rsprintf(loc("Message moved successfully from \"%s\" to \"%s\""), lbs->name, lbs_dest->name); + rsprintf(loc("moved successfully from \"%s\" to \"%s\""), lbs->name, lbs_dest->name); else - rsprintf(loc("Message copied successfully from \"%s\" to \"%s\""), lbs->name, lbs_dest->name); + rsprintf(loc("copied successfully from \"%s\" to \"%s\""), lbs->name, lbs_dest->name); } rsprintf("\n");