Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Corrected frames preview displaying eventually incorrectly in local administration mode.
lucbefb2415f8ae
diff --git a/htroot/ConfigPortal.html b/htroot/ConfigPortal.htmlindex f608f1249..1533e47c4 100644--- a/htroot/ConfigPortal.html+++ b/htroot/ConfigPortal.html@@ -146,7 +146,7 @@</pre></fieldset>This would look like:<iframe name="target"- src="http://#[myaddress]#/index.html?display=2&resource=local&focus=0"+ src="http://#[myPreviewAddress]#/index.html?display=2&resource=local&focus=0"width="100%"height="410"frameborder="0"@@ -169,7 +169,7 @@</pre></fieldset>This would look like:<iframe name="target2"- src="http://#[myaddress]#/yacysearch.html?display=2&resource=local&focus=0"+ src="http://#[myPreviewAddress]#/yacysearch.html?display=2&resource=local&focus=0"width="100%"height="180"frameborder="0"@@ -193,7 +193,7 @@</pre></fieldset>This would look like:<iframe name="target3"- src="http://#[myaddress]#/yacyinteractive.html?display=2&focus=0"+ src="http://#[myPreviewAddress]#/yacyinteractive.html?display=2&focus=0"width="100%"height="180"frameborder="0"diff --git a/htroot/ConfigPortal.java b/htroot/ConfigPortal.javaindex 547310157..2e2faf75c 100644--- a/htroot/ConfigPortal.java+++ b/htroot/ConfigPortal.java@@ -224,11 +224,19 @@ public class ConfigPortal {prop.put("target_selected_special_searchresult", "searchresult".equals(target_special) ? 1 : 0);prop.put("target_special_pattern", sb.getConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL_PATTERN, ""));+ /* Addresse used in code template */String myaddress = (sb.peers == null) || sb.peers.mySeed() == null || sb.peers.mySeed().getIP() == null ? null : sb.peers.mySeed().getPublicAddress(sb.peers.mySeed().getIP());if (myaddress == null) {myaddress = "localhost:" + sb.getLocalPort();}prop.put("myaddress", myaddress);++ /* Adress used to display iframe preview : no need to use public adress when coming from local */+ String myPreviewAddress = myaddress;+ if(header.accessFromLocalhost()) {+ myPreviewAddress = "localhost:" + sb.getLocalPort();+ }+ prop.put("myPreviewAddress", myPreviewAddress);return prop;}