From 08108f0ece3020d21bd38b122983df4dc5016f3c Mon Sep 17 00:00:00 2001 From: orbiter Date: Sun, 17 Apr 2011 22:53:15 +0000 Subject: [PATCH] fix for http://bugs.yacy.net/view.php?id=12 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7665 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/index.html | 12 +++++++----- htroot/index.java | 9 +++++---- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/htroot/index.html b/htroot/index.html index d449c1a49..9338e3bc7 100644 --- a/htroot/index.html +++ b/htroot/index.html @@ -85,20 +85,22 @@ + #(resource-select)#:: : - #(resource-global-disabled)#:: + #(global-disabled)#:: Global search is disabled because
#(reason)# DHT Distribution is:: Index Receive is:: DHT Distribution and Index Receive are#(/reason)# - disabled.#(/resource-global-disabled)# + disabled.#(/global-disabled)# + #(/resource-select)# : diff --git a/htroot/index.java b/htroot/index.java index 4ab2f9707..6414b972f 100644 --- a/htroot/index.java +++ b/htroot/index.java @@ -102,10 +102,11 @@ public class index { 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"); - prop.put("searchoptions_resource-global", global ? "1" : "0"); - prop.put("searchoptions_resource-global-disabled", (indexReceiveGranted && indexDistributeGranted) ? "0" : "1"); - prop.put("searchoptions_resource-global-disabled_reason", (indexReceiveGranted) ? "0" : (indexDistributeGranted ? "1" : "2")); - prop.put("searchoptions_resource-local", global ? "0" : "1"); + prop.put("searchoptions_resource-select", sb.peers.sizeConnected() > 0 ? 1 : 0); + prop.put("searchoptions_resource-select_global", global ? "1" : "0"); + prop.put("searchoptions_resource-select_global-disabled", (indexReceiveGranted && indexDistributeGranted) ? "0" : "1"); + prop.put("searchoptions_resource-select_global-disabled_reason", (indexReceiveGranted) ? "0" : (indexDistributeGranted ? "1" : "2")); + prop.put("searchoptions_resource-select_local", global ? "0" : "1"); prop.put("searchoptions_urlmaskoptions", "0"); prop.putHTML("searchoptions_urlmaskoptions_urlmaskfilter", urlmaskfilter); prop.put("searchoptions_prefermaskoptions", "0");