From 1bece0e524811a0da8aae5a27c3c130a7e452a4e Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: May 01 2015 16:15:18 +0000 Subject: Ticket #47467 - Improve Add CRL/CKL dialog and errors Description: Additional modifications to the error messages. When an input for CRL/CKL is missing, the generated error message is not broken and does not give much help. DBT_MISSING_THIS + DBT_MISSING_FILE You should enter a No file specified. Enter the full path of a file.' If the object of the "enter" is DBT_MISSING_FILE, change to just print it. And modified the sentense as follows: Enter a file name in the configuration directory or the full path of a file. https://fedorahosted.org/389/ticket/47467 Reviewed by rmeggins@redhat.com (Thank you, Rich!!) --- diff --git a/admserv/cgi-src40/security.c b/admserv/cgi-src40/security.c index d604f88..34bf3a7 100644 --- a/admserv/cgi-src40/security.c +++ b/admserv/cgi-src40/security.c @@ -223,9 +223,14 @@ getResourceString(char *key) { } } -static char * getParameter(char *key, char *keyName) { - - PR_snprintf(line, sizeof(line), getResourceString(DBT_MISSING_THIS), keyName); +static char * getParameter(char *key, char *keyName) +{ + if (strcmp(keyName, getResourceString(DBT_MISSING_FILE))) { + /* not a missing file */ + PR_snprintf(line, sizeof(line), getResourceString(DBT_MISSING_THIS), keyName); + } else { + PR_snprintf(line, sizeof(line), getResourceString(DBT_MISSING_FILE)); + } return get_cgi_var(key, getResourceString(DBT_PARAMETERMISSING), line); } diff --git a/admserv/cgi-src40/security.properties b/admserv/cgi-src40/security.properties index 289eef5..7a67f5d 100644 --- a/admserv/cgi-src40/security.properties +++ b/admserv/cgi-src40/security.properties @@ -61,7 +61,7 @@ security45 { "Unable to find the CRL or CKL specified." } security50 { "Could not open file %s. File does not exist or filename is invalid. A filename that exists in the server security directory must be specified. Absolute or relative paths should not be specified." } security51 { "Could not add module found in file %s." } security52 { "The module has been successfully added. Please restart the console for changes to take effect." } -security53 { "No file specified. Enter the full path of a file." } +security53 { "No file specified. Enter a file name in the configuration directory or the full path of a file." } security54 { "No file format specified." } security55 { "Invalid file format." } security56 { "No module name or incorrect module name specified. Please enter a valid module name." }