fix for 'cannot switch back to default language'-bug

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6649 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent d6391f2537
commit be18b5d8cd

@ -83,7 +83,7 @@ public class ConfigLanguage_p {
* read from the language directory. This is very important to prevent * read from the language directory. This is very important to prevent
* directory traversal attacks! * directory traversal attacks!
*/ */
if (langFiles.contains(selectedLanguage)) { if (langFiles.contains(selectedLanguage) || selectedLanguage.startsWith("default")) {
translator.changeLang(env, langPath, selectedLanguage); translator.changeLang(env, langPath, selectedLanguage);
} }

@ -226,7 +226,7 @@ public class translator {
final HashMap<String, String> map = new HashMap<String, String>(); final HashMap<String, String> map = new HashMap<String, String>();
int p; int p;
for (int i = 0; i < ms.length; i++) { for (int i = 0; i < ms.length; i++) {
p = ms[i].indexOf("/"); p = ms[i].indexOf('/');
if (p > 0) if (p > 0)
map.put(ms[i].substring(0, p), ms[i].substring(p + 1)); map.put(ms[i].substring(0, p), ms[i].substring(p + 1));
} }

Loading…
Cancel
Save