From c4531092829911c6a37542142a056e3eb7be9972 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Wed, 10 Jan 2007 17:00:34 +0000 Subject: [PATCH] Fixed problem with "Update" command when "new" (not "New") is in "Menu Commands" SVN revision: 1780 --- src/elogd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index 6cee0e8c..0083e88a 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -16043,7 +16043,7 @@ BOOL is_command_allowed(LOGBOOK * lbs, char *command) strlcat(other_str, "Cancel, First, Last, Previous, Next, Requested, Forgot, ", sizeof(other_str)); /* only allow Submit & Co if "New" is allowed */ - if (strstr(menu_str, "New")) + if (stristr(menu_str, "New")) strlcat(other_str, "Update, Upload, Submit, Save, ", sizeof(other_str)); /* add save for new user registration */ @@ -16058,15 +16058,15 @@ BOOL is_command_allowed(LOGBOOK * lbs, char *command) } /* allow import if CSV import is present */ - if (strstr(menu_str, loc("CSV Import"))) + if (stristr(menu_str, loc("CSV Import"))) strcat(other_str, "Import, "); /* allow change password if "config" possible */ - if (strieq(command, loc("Change password")) && strstr(menu_str, "Config")) { + if (strieq(command, loc("Change password")) && stristr(menu_str, "Config")) { return TRUE; } /* exclude non-localized submit for elog */ - else if (command[0] && strieq(command, "Submit") && strstr(menu_str, "New")) { + else if (command[0] && strieq(command, "Submit") && stristr(menu_str, "New")) { return TRUE; } /* exclude other non-localized commands */