Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Removed a use of the deprecated Seed.getIP()
luccioman75802dcf00d6
diff --git a/htroot/ConfigSearchBox.html b/htroot/ConfigSearchBox.htmlindex 19dfc9fda..0679a33eb 100644--- a/htroot/ConfigSearchBox.html+++ b/htroot/ConfigSearchBox.html@@ -17,7 +17,7 @@Simply use the following code:</h3><fieldset><pre>-<form method="get" accept-charset="UTF-8" action="http://#[myaddress]#/yacysearch.html">+<form method="get" accept-charset="UTF-8" action="#[myaddress]#/yacysearch.html"><div style="text-align:center; padding:5px; background-color:#eeeeee; border:1px solid #cccccc; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; display:block; float:left; margin-right:5px;"><div style="font-family:Arial,Helvetica,sans-serif; font-size:16px; display:block; float:left; padding-top:3px; padding-right:5px;">MySearch@@ -41,7 +41,7 @@</pre></fieldset>This would look like:-<form method="get" accept-charset="UTF-8" action="http://#[myaddress]#/yacysearch.html">+<form method="get" accept-charset="UTF-8" action="yacysearch.html"><div style="text-align:center; padding:5px; background-color:#eeeeee; border:1px solid #cccccc; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; display:block; float:left; margin-right:5px;"><div style="font-family:Arial,Helvetica,sans-serif; font-size:16px; display:block; float:left; padding-top:3px; padding-right:5px;">MySearchdiff --git a/htroot/ConfigSearchBox.java b/htroot/ConfigSearchBox.javaindex 37bf79ff9..05bde9ac3 100644--- a/htroot/ConfigSearchBox.java+++ b/htroot/ConfigSearchBox.java@@ -24,19 +24,19 @@// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USAimport net.yacy.cora.protocol.RequestHeader;+import net.yacy.http.servlets.YaCyDefaultServlet;import net.yacy.search.Switchboard;import net.yacy.server.serverObjects;import net.yacy.server.serverSwitch;public class ConfigSearchBox {- public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {+ public static serverObjects respond(final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {final serverObjects prop = new serverObjects();final Switchboard sb = (Switchboard) env;- String myaddress = 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);+ /* Fill the base URL used to render a sample code integration example */+ prop.put("myaddress", YaCyDefaultServlet.getContext(header, sb));return prop;}