- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 12 Oct 2009 13:12:28 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action In directory hutz:/tmp/cvs-serv29241/src/org/w3c/unicorn/action Modified Files: LanguageAction.java Log Message: if translator name or mail is null, set to "Anonymous" and "not specified" Index: LanguageAction.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/LanguageAction.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- LanguageAction.java 9 Oct 2009 14:57:42 -0000 1.9 +++ LanguageAction.java 12 Oct 2009 13:12:26 -0000 1.10 @@ -186,8 +186,15 @@ baos.close(); contextObjects.put("properties", baos.toString("UTF-8")); contextObjects.put("changeLog", changeLog); - contextObjects.put("translator_name", req.getParameter("translator_name")); - contextObjects.put("translator_mail", req.getParameter("translator_mail")); + + if (req.getParameter("translator_name") != null) + contextObjects.put("translator_name", req.getParameter("translator_name")); + else + contextObjects.put("translator_name", "Anonymous"); + if (req.getParameter("translator_mail") != null) + contextObjects.put("translator_mail", req.getParameter("translator_mail")); + else + contextObjects.put("translator_mail", "Not specified"); contextObjects.put("translator_comments", req.getParameter("translator_comments")); contextObjects.put("language", Language.getLocale(languageParameter).getDisplayLanguage(Locale.ENGLISH));
Received on Monday, 12 October 2009 13:12:29 UTC