diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html index 9159be117..974c3613c 100644 --- a/htroot/yacysearch.html +++ b/htroot/yacysearch.html @@ -55,6 +55,7 @@ $(function() { $("#sidebar2").accordion({}); $("#sidebar2").accordion('activate', false); $("#sidebar3").accordion({}); + $("#sidebar3").accordion('activate', false); $("#search").focus(); }); //]]> diff --git a/htroot/yacysearchtrailer.java b/htroot/yacysearchtrailer.java index 33a8b55b9..950b99cd5 100644 --- a/htroot/yacysearchtrailer.java +++ b/htroot/yacysearchtrailer.java @@ -106,27 +106,31 @@ public class yacysearchtrailer { // attach always the topics ArrayList topicNavigator = theSearch.getTopicNavigator(10); - if (topicNavigator == null) topicNavigator = new ArrayList(); - int i = 0; - NavigatorEntry e; - Iterator iter = topicNavigator.iterator(); - while (iter.hasNext()) { - e = iter.next(); - if (/*(theQuery == null) ||*/ (theQuery.queryString == null)) break; - if (e != null && e.name != null) { - prop.putHTML("nav-topics_element_" + i + "_name", e.name); - prop.put("nav-topics_element_" + i + "_url", "" + e.name + " (" + e.count + ")"); - prop.putJSON("nav-topics_element_" + i + "_url-json", QueryParams.navurl("json", 0, display, theQuery, theQuery.urlMask, e.name, theQuery.navigators)); - prop.put("nav-topics_element_" + i + "_count", e.count); - prop.put("nav-topics_element_" + i + "_modifier", e.name); - prop.put("nav-topics_element_" + i + "_nl", (iter.hasNext() && i < MAX_TOPWORDS) ? 1 : 0); - } - if (i++ > MAX_TOPWORDS) { - break; + if (topicNavigator == null || topicNavigator.size() == 0) { + topicNavigator = new ArrayList(); + prop.put("nav-topics", "0"); + } else { + prop.put("nav-topics", "1"); + int i = 0; + NavigatorEntry e; + Iterator iter = topicNavigator.iterator(); + while (iter.hasNext()) { + e = iter.next(); + if (/*(theQuery == null) ||*/ (theQuery.queryString == null)) break; + if (e != null && e.name != null) { + prop.putHTML("nav-topics_element_" + i + "_name", e.name); + prop.put("nav-topics_element_" + i + "_url", "" + e.name + " (" + e.count + ")"); + prop.putJSON("nav-topics_element_" + i + "_url-json", QueryParams.navurl("json", 0, display, theQuery, theQuery.urlMask, e.name, theQuery.navigators)); + prop.put("nav-topics_element_" + i + "_count", e.count); + prop.put("nav-topics_element_" + i + "_modifier", e.name); + prop.put("nav-topics_element_" + i + "_nl", (iter.hasNext() && i < MAX_TOPWORDS) ? 1 : 0); + } + if (i++ > MAX_TOPWORDS) { + break; + } } + prop.put("nav-topics_element", i); } - prop.put("nav-topics_element", i); - prop.put("nav-topics", "1"); serverProfiling.update("SEARCH", new ProfilingGraph.searchEvent(theQuery.id(true), SearchEvent.FINALIZATION + "-" + "bottomline", 0, 0), false);