fix for compare search: use scroogle instead of bing and get a default search if configured search engine is not available

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@8074 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 13 years ago
parent 9f3ea1d0f4
commit 5866c73a09

@ -955,7 +955,7 @@ routing.deleteOldSeeds.time = 30
# options to remember the default search engines when using the search compare features
compare_yacy.left = YaCy
compare_yacy.right = google.com
compare_yacy.right = scroogle.org
# minimum free disk space for crawling (MiB)
disk.free = 3000

@ -36,7 +36,7 @@ import de.anomic.server.servletProperties;
public class compare_yacy {
private static final String defaultsearchL = "YaCy";
private static final String defaultsearchR = "bing.com";
private static final String defaultsearchR = "scroogle.org";
private static final String[] order = {defaultsearchL, "YaCy (local)", "bing.com",
/*"google.de",*/ defaultsearchR, "scroogle.org",
"metager.de", "metager2.de (web)", "metager2.de (international)",
@ -73,7 +73,9 @@ public class compare_yacy {
prop.put("display", display);
String default_left = sb.getConfig("compare_yacy.left", defaultsearchL);
if (!searchengines.containsKey(default_left)) default_left = defaultsearchL;
String default_right = sb.getConfig("compare_yacy.right", defaultsearchR);
if (!searchengines.containsKey(default_right)) default_right = defaultsearchR;
if (post != null) {
if (searchengines.get(post.get("left", default_left)) != null) {

Loading…
Cancel
Save