Skip to content

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

*) Some cosmetical changes and corrections

rramthune6fb6426a39b
diff --git a/htroot/NetworkPicture.java b/htroot/NetworkPicture.java
index ebb64ab73..01df35e05 100644
--- a/htroot/NetworkPicture.java
+++ b/htroot/NetworkPicture.java
@@ -50,8 +50,7 @@ import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
import de.anomic.ymage.ymageMatrix;
-// draw a picture of the yacy network
-
+/** draw a picture of the yacy network */
public class NetworkPicture {
public static ymageMatrix respond(httpHeader header, serverObjects post, serverSwitch env) {
diff --git a/locales/de.lng b/locales/de.lng
index d776f6319..f74d5fedd 100644
--- a/locales/de.lng
+++ b/locales/de.lng
@@ -1039,8 +1039,8 @@ Passive \(disconnected Senior and Principal\)==Passiv (nicht verbundene Senior u
Potential \(Junior\)==Potenziell (Junior)
Network Total==Netzwerk insgesamt
#YaCy Cluster==YaCy Cluster
-Indexing Speed: \#\[gppm\]\# Pages Per Minute \(PPM\)==Indexier Geschwindikeit: #[gppm]# Seiten pro Minute (PPM)
-Query Frequency: \#\[gqph\]\# Queries Per Hour \(QPH\)==Suchfrequenz: #[gqph]# Suchanfragen pro Minute (QPH)
+Indexing Speed: \#\[gppm\]\# Pages Per Minute \(PPM\)==Indexier Geschwindigkeit: #[gppm]# Seiten pro Minute (PPM)
+Query Frequency: \#\[gqph\]\# Queries Per Hour \(QPH\)==Suchfrequenz: #[gqph]# Suchanfragen pro Stunde (QPH)
Your Peer:==Ihr Peer:
Version==Version
Own/Other==Eigene/Andere
diff --git a/source/de/anomic/data/userDB.java b/source/de/anomic/data/userDB.java
index 7b57dd86d..fe93c5778 100644
--- a/source/de/anomic/data/userDB.java
+++ b/source/de/anomic/data/userDB.java
@@ -5,7 +5,7 @@
//(C) 2005, 2006 by Martin Thelian
// Alexander Schier
//
-//last change: $LastChangedDate$ by $LastChangedBy: $
+//last change: $LastChangedDate$ by $LastChangedBy$
//Revision: $LastChangedRevision$
//
//This program is free software; you can redistribute it and/or modify
@@ -125,7 +125,7 @@ public final class userDB {
}
}
- /*
+ /**
* use a ProxyAuth String to authenticate a user
* @param auth a base64 Encoded String, which contains "username:pw".
*/
@@ -162,11 +162,9 @@ public final class userDB {
entry=proxyAuth(auth);
if(entry == null)
entry=cookieAuth(cookies);
- if(entry == null)
- entry=cookieAuth(cookies);
return entry;
}
- /*
+ /**
* determinate, if a user has Adminrights from a authorisation http-headerfield
* it tests both userDB and oldstyle adminpw.
* @param auth the http-headerline for authorisation
@@ -175,13 +173,13 @@ public final class userDB {
Entry entry=getUser(auth, ip, cookies);
if(entry != null)
return entry.hasAdminRight();
- else if(cookieAdminAuth(cookies))
+ else if(entry != null && cookieAdminAuth(cookies))
return entry.hasAdminRight();
else
return false;
}
- /*
+ /**
* use a ProxyAuth String to authenticate a user and save the ip/username for ipAuth
* @param auth a base64 Encoded String, which contains "username:pw".
* @param ip an ip.
@@ -195,7 +193,7 @@ public final class userDB {
this.ipUsers.put(ip, entry.getUserName());
return entry;
}
- /*
+ /**
* authenticate a user by ip, if he had used proxyAuth in the last 10 Minutes
* @param ip the IP of the User
*/
diff --git a/source/de/anomic/plasma/plasmaGrafics.java b/source/de/anomic/plasma/plasmaGrafics.java
index f494919f1..54d1b2b20 100644
--- a/source/de/anomic/plasma/plasmaGrafics.java
+++ b/source/de/anomic/plasma/plasmaGrafics.java
@@ -208,6 +208,7 @@ public class plasmaGrafics {
int count = 0;
int totalCount = 0;
Enumeration e = yacyCore.seedDB.seedsConnected(true, false, null, (float) 0.0);
+
while (e.hasMoreElements() && count < maxCount) {
seed = (yacySeed) e.nextElement();
if (seed != null) {
diff --git a/source/de/anomic/plasma/plasmaHTCache.java b/source/de/anomic/plasma/plasmaHTCache.java
index 6364e8219..2d8469c18 100644
--- a/source/de/anomic/plasma/plasmaHTCache.java
+++ b/source/de/anomic/plasma/plasmaHTCache.java
@@ -7,7 +7,7 @@
//
// $LastChangedDate$
// $LastChangedRevision$
-// $LastChangedBy: $
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -540,31 +540,23 @@ public final class plasmaHTCache {
public static boolean noIndexingURL(String urlString) {
if (urlString == null) return false;
urlString = urlString.toLowerCase();
-// return (
-// (urlString.endsWith(".gz")) ||
-// (urlString.endsWith(".msi")) ||
-// (urlString.endsWith(".doc")) ||
-// (urlString.endsWith(".zip")) ||
-// (urlString.endsWith(".tgz")) ||
-// (urlString.endsWith(".rar")) ||
-// (urlString.endsWith(".pdf")) ||
-// (urlString.endsWith(".ppt")) ||
-// (urlString.endsWith(".xls")) ||
-// (urlString.endsWith(".log")) ||
-// (urlString.endsWith(".java")) ||
-// (urlString.endsWith(".c")) ||
-// (urlString.endsWith(".p"))
-// );
+
+ //http://www.yacy.net/getimage.php?image.png
+
int idx = urlString.indexOf("?");
if (idx > 0) urlString = urlString.substring(0,idx);
+ //http://www.yacy.net/getimage.php
+
idx = urlString.lastIndexOf(".");
if (idx > 0) urlString = urlString.substring(idx+1);
+ //php
+
return plasmaParser.mediaExtContains(urlString);
}
- /*
+ /**
* This function moves an old cached object (if it exists) to the new position
*/
private void moveCachedObject(File oldpath, File newpath) {
diff --git a/source/de/anomic/yacy/yacySeedDB.java b/source/de/anomic/yacy/yacySeedDB.java
index a75a24068..8be4218ae 100644
--- a/source/de/anomic/yacy/yacySeedDB.java
+++ b/source/de/anomic/yacy/yacySeedDB.java
@@ -6,7 +6,7 @@
//
// $LastChangedDate$
// $LastChangedRevision$
-// $LastChangedBy: $
+// $LastChangedBy$
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -535,7 +535,7 @@ public final class yacySeedDB {
if (seed != null) {
addressStr = seed.getAddress();
if (addressStr == null) {
- serverLog.logWarning("YACY","lookupByIP: address of seed " + seed.getName() + "is null.");
+ serverLog.logWarning("YACY","lookupByIP: address of seed " + seed.getName() + " is null.");
continue;
}
if ((pos = addressStr.indexOf(":"))!= -1) {