Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix for http://forum.yacy-websuche.de/viewtopic.php?p=21763#p21763 and another fix for non-working global search when search options are switched off

orbiter70ca7cec8c04
diff --git a/htroot/ConfigPortal.java b/htroot/ConfigPortal.java
index 6d6336f00..beaa60c56 100644
--- a/htroot/ConfigPortal.java
+++ b/htroot/ConfigPortal.java
@@ -85,8 +85,15 @@ public class ConfigPortal {
sb.setConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, "/env/grafics/YaCyLogo_60ppi.png");
sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_PAGE, "Status.html");
sb.setConfig(SwitchboardConstants.INDEX_FORWARD, "");
- sb.setConfig("indexForward", "Status.html");
+ HTTPDFileHandler.indexForward = "";
sb.setConfig(SwitchboardConstants.SEARCH_TARGET, "_self");
+ sb.setConfig("publicTopmenu", "true");
+ sb.setConfig("search.options", "true");
+ sb.setConfig("search.result.show.date", "true");
+ sb.setConfig("search.result.show.size", "true");
+ sb.setConfig("search.result.show.metadata", "true");
+ sb.setConfig("search.result.show.parser", "true");
+ sb.setConfig("search.result.show.pictures", "true");
}
}
diff --git a/htroot/index.html b/htroot/index.html
index 1fcf985b9..39581ec93 100644
--- a/htroot/index.html
+++ b/htroot/index.html
@@ -60,14 +60,14 @@
</div>
#(/searchdomswitches)#
<input type="hidden" name="nav" value="all" />
- #(searchoptions)#::
- <input type="hidden" name="maximumRecords" value="#[maximumRecords]#" />
<input type="hidden" name="startRecord" value="0" />
<input type="hidden" name="resource" value="global" />
<input type="hidden" name="urlmaskfilter" value=".*" />
<input type="hidden" name="prefermaskfilter" value="" />
<input type="hidden" name="indexof" value="off" />
<input type="hidden" name="meanCount" value="5" />
+ <input type="hidden" name="maximumRecords" value="#[maximumRecords]#" />
+ #(searchoptions)#::
</fieldset>
<p><a href="/index.html?searchoptions=2" onclick="this.href='/index.html?searchoptions=2&amp;former='+document.getElementById('searchform').search.value+'&amp;contentdom='+radioValue(document.getElementById('searchform').contentdom)">more options...</a></p>
<p><a href="http://www.yacy-websuche.de/wiki/index.php/En:SearchParameters">advanced parameters</a></p>
diff --git a/htroot/index.java b/htroot/index.java
index 4c985ab95..821eca613 100644
--- a/htroot/index.java
+++ b/htroot/index.java
@@ -100,8 +100,8 @@ public class index {
prop.put("excluded", "0");
prop.put("combine", "0");
prop.put("resultbottomline", "0");
+ prop.put("maximumRecords", maximumRecords);
prop.put("searchoptions", searchoptions);
- prop.put("searchoptions_maximumRecords", maximumRecords);
prop.put("searchoptions_count-10", (count == 10) ? "1" : "0");
prop.put("searchoptions_count-50", (count == 50) ? "1" : "0");
prop.put("searchoptions_count-100", (count == 100) ? "1" : "0");
diff --git a/source/de/anomic/http/server/HTTPDFileHandler.java b/source/de/anomic/http/server/HTTPDFileHandler.java
index 6213591bd..91cbbdf5b 100644
--- a/source/de/anomic/http/server/HTTPDFileHandler.java
+++ b/source/de/anomic/http/server/HTTPDFileHandler.java
@@ -180,7 +180,7 @@ public final class HTTPDFileHandler {
// create default files array
defaultFiles = switchboard.getConfig("defaultFiles","index.html").split(",");
if (defaultFiles.length == 0) defaultFiles = new String[] {"index.html"};
- indexForward = switchboard.getConfig("indexForward", "");
+ indexForward = switchboard.getConfig(SwitchboardConstants.INDEX_FORWARD, "");
if (indexForward.startsWith("/")) indexForward = indexForward.substring(1);
}