Skip to content

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

removed unnecessary functions

orbiter6680634703c9
diff --git a/htroot/Status.java b/htroot/Status.java
index 76431e592..ef5755694 100644
--- a/htroot/Status.java
+++ b/htroot/Status.java
@@ -46,7 +46,6 @@
// javac -classpath .:../Classes Status.java
// if the shell's current path is HTROOT
-import java.io.IOException;
import java.util.Date;
import de.anomic.http.httpHeader;
@@ -63,7 +62,6 @@ import de.anomic.server.serverSwitch;
import de.anomic.tools.yFormatter;
import de.anomic.yacy.yacyCore;
import de.anomic.yacy.yacySeed;
-import de.anomic.yacy.yacyURL;
import de.anomic.yacy.yacyVersion;
public class Status {
@@ -111,18 +109,7 @@ public class Status {
sb.setConfig("browserPopUpTrigger", "true");
}
redirect = true;
- } else if (post.containsKey("downloadRelease")) {
- // download a release
- String release = post.get("releasedownload", "");
- if (release.length() > 0) {
- try {
- yacyVersion.downloadRelease(new yacyVersion(new yacyURL(release, null)));
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
+ }
if (redirect) {
prop.put("LOCATION","");
diff --git a/htroot/index.java b/htroot/index.java
index 6425a19d8..9dc9082ec 100644
--- a/htroot/index.java
+++ b/htroot/index.java
@@ -1,5 +1,5 @@
// index.java
-// (C) 2004, 2005, 2006 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
+// (C) 2004-2007 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany
// first published 2004 on http://www.anomic.de
//
// This is a part of YaCy, a peer-to-peer based web search engine
@@ -28,18 +28,13 @@
// javac -classpath .:../classes index.java
// if the shell's current path is HTROOT
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.HashMap;
import de.anomic.http.httpHeader;
import de.anomic.plasma.plasmaSearchQuery;
import de.anomic.plasma.plasmaSwitchboard;
-import de.anomic.server.serverDate;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
import de.anomic.yacy.yacyCore;
-import de.anomic.yacy.yacyURL;
public class index {
@@ -68,14 +63,14 @@ public class index {
final int time = Math.min(60, (post == null) ? 6 : post.getInt("time", 6));
final String urlmaskfilter = (post == null) ? ".*" : post.get("urlmaskfilter", ".*");
final String prefermaskfilter = (post == null) ? "" : post.get("prefermaskfilter", "");
- final String constraint = (post == null) ? plasmaSearchQuery.catchall_constraint.exportB64() : post.get("constraint", "______");
+ final String constraint = (post == null) ? null : post.get("constraint", null);
final String cat = (post == null) ? "href" : post.get("cat", "href");
final int type = (post == null) ? 0 : post.getInt("type", 0);
final boolean indexDistributeGranted = sb.getConfigBool(plasmaSwitchboard.INDEX_DIST_ALLOW, true);
final boolean indexReceiveGranted = sb.getConfigBool(plasmaSwitchboard.INDEX_RECEIVE_ALLOW, true);
global = global && indexDistributeGranted && indexReceiveGranted;
-
+/*
final String referer = (String) header.get(httpHeader.REFERER);
if (referer != null) {
yacyURL url;
@@ -93,7 +88,7 @@ public class index {
if (sb.facilityDB != null) try {sb.facilityDB.update("backlinks", referer, referrerprop);} catch (IOException e) {}
}
}
-
+*/
// search domain
int contentdom = plasmaSearchQuery.CONTENTDOM_TEXT;
String cds = (post == null) ? "text" : post.get("contentdom", "text");
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index 57b543d8b..92f4f193a 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -46,8 +46,6 @@
// javac -classpath .:../classes yacysearch.java
// if the shell's current path is HTROOT
-import java.io.IOException;
-import java.net.MalformedURLException;
import java.util.HashMap;
import java.util.TreeSet;
@@ -62,7 +60,6 @@ import de.anomic.plasma.plasmaSearchQuery;
import de.anomic.plasma.plasmaSnippetCache;
import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.server.serverCore;
-import de.anomic.server.serverDate;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
import de.anomic.server.logging.serverLog;
@@ -88,15 +85,14 @@ public class yacysearch {
if (promoteSearchPageGreeting.length() == 0) promoteSearchPageGreeting = "P2P WEB SEARCH";
// case if no values are requested
- final String referer = (String) header.get("Referer");
String querystring = (post == null) ? "" : post.get("search", "").trim();
boolean rss = post.get("rss", "false").equals("true");
if ((post == null) || (env == null) || (querystring.length() == 0) || (!searchAllowed)) {
-
+ /*
// save referrer
- // System.out.println("HEADER=" + header.toString());
- if (referer != null) {
+ final String referer = (String) header.get("Referer");
+ if (referer != null) {
yacyURL url;
try { url = new yacyURL(referer, null); } catch (MalformedURLException e) { url = null; }
if ((url != null) && (!url.isLocal())) {
@@ -108,7 +104,7 @@ public class yacysearch {
if (sb.facilityDB != null) try { sb.facilityDB.update("backlinks", referer, referrerprop); } catch (IOException e) {}
}
}
-
+ */
// we create empty entries for template strings
final serverObjects prop = new serverObjects();
prop.put("searchagain", "0");