From fed8bd6325c8e0262cf8580bd4567e3b15ce3b72 Mon Sep 17 00:00:00 2001
From: Michael Peter Christen Appearance and Integration
@@ -34,19 +46,19 @@
If you create a search portal with YaCy then you can
change the appearance of the search page here.
Unable to get URL: #[url]#
::Error saving the skin.
diff --git a/htroot/ConfigAppearance_p.java b/htroot/ConfigAppearance_p.java index 2051e2aec..ea5bae159 100644 --- a/htroot/ConfigAppearance_p.java +++ b/htroot/ConfigAppearance_p.java @@ -138,19 +138,22 @@ public class ConfigAppearance_p { } } + String currentSkin = env.getConfig("currentSkin", "default"); + prop.putHTML("currentskin", currentSkin); // reread skins skinFiles = FileUtils.getDirListing(skinPath, SKIN_FILENAME_FILTER); Collections.sort(skinFiles); int count = 0; for (final String skinFile : skinFiles) { if (skinFile.endsWith(".css")) { + String skinName = skinFile.substring(0, skinFile.length() - 4); prop.put("skinlist_" + count + "_file", skinFile); - prop.put("skinlist_" + count + "_name", skinFile.substring(0, skinFile.length() - 4)); + prop.put("skinlist_" + count + "_name", skinName); + prop.put("skinlist_" + count + "_selected", skinName.equals(currentSkin) ? 1 : 0); count++; } } prop.put("skinlist", count); - prop.putHTML("currentskin", env.getConfig("currentSkin", "default")); // write colors from generic skin Iterator