*) Some cosmetical changes and corrections

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3582 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
rramthun 18 years ago
parent eeb5d62bff
commit e6fb6426a3

@ -50,8 +50,7 @@ import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch; import de.anomic.server.serverSwitch;
import de.anomic.ymage.ymageMatrix; import de.anomic.ymage.ymageMatrix;
// draw a picture of the yacy network /** draw a picture of the yacy network */
public class NetworkPicture { public class NetworkPicture {
public static ymageMatrix respond(httpHeader header, serverObjects post, serverSwitch env) { public static ymageMatrix respond(httpHeader header, serverObjects post, serverSwitch env) {

@ -1039,8 +1039,8 @@ Passive \(disconnected Senior and Principal\)==Passiv (nicht verbundene Senior u
Potential \(Junior\)==Potenziell (Junior) Potential \(Junior\)==Potenziell (Junior)
Network Total==Netzwerk insgesamt Network Total==Netzwerk insgesamt
#YaCy Cluster==YaCy Cluster #YaCy Cluster==YaCy Cluster
Indexing Speed: \#\[gppm\]\# Pages Per Minute \(PPM\)==Indexier Geschwindikeit: #[gppm]# Seiten pro Minute (PPM) 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 Minute (QPH) Query Frequency: \#\[gqph\]\# Queries Per Hour \(QPH\)==Suchfrequenz: #[gqph]# Suchanfragen pro Stunde (QPH)
Your Peer:==Ihr Peer: Your Peer:==Ihr Peer:
Version==Version Version==Version
Own/Other==Eigene/Andere Own/Other==Eigene/Andere

@ -5,7 +5,7 @@
//(C) 2005, 2006 by Martin Thelian //(C) 2005, 2006 by Martin Thelian
// Alexander Schier // Alexander Schier
// //
//last change: $LastChangedDate$ by $LastChangedBy: $ //last change: $LastChangedDate$ by $LastChangedBy$
//Revision: $LastChangedRevision$ //Revision: $LastChangedRevision$
// //
//This program is free software; you can redistribute it and/or modify //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 * use a ProxyAuth String to authenticate a user
* @param auth a base64 Encoded String, which contains "username:pw". * @param auth a base64 Encoded String, which contains "username:pw".
*/ */
@ -162,11 +162,9 @@ public final class userDB {
entry=proxyAuth(auth); entry=proxyAuth(auth);
if(entry == null) if(entry == null)
entry=cookieAuth(cookies); entry=cookieAuth(cookies);
if(entry == null)
entry=cookieAuth(cookies);
return entry; return entry;
} }
/* /**
* determinate, if a user has Adminrights from a authorisation http-headerfield * determinate, if a user has Adminrights from a authorisation http-headerfield
* it tests both userDB and oldstyle adminpw. * it tests both userDB and oldstyle adminpw.
* @param auth the http-headerline for authorisation * @param auth the http-headerline for authorisation
@ -175,13 +173,13 @@ public final class userDB {
Entry entry=getUser(auth, ip, cookies); Entry entry=getUser(auth, ip, cookies);
if(entry != null) if(entry != null)
return entry.hasAdminRight(); return entry.hasAdminRight();
else if(cookieAdminAuth(cookies)) else if(entry != null && cookieAdminAuth(cookies))
return entry.hasAdminRight(); return entry.hasAdminRight();
else else
return false; return false;
} }
/* /**
* use a ProxyAuth String to authenticate a user and save the ip/username for ipAuth * 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 auth a base64 Encoded String, which contains "username:pw".
* @param ip an ip. * @param ip an ip.
@ -195,7 +193,7 @@ public final class userDB {
this.ipUsers.put(ip, entry.getUserName()); this.ipUsers.put(ip, entry.getUserName());
return entry; return entry;
} }
/* /**
* authenticate a user by ip, if he had used proxyAuth in the last 10 Minutes * authenticate a user by ip, if he had used proxyAuth in the last 10 Minutes
* @param ip the IP of the User * @param ip the IP of the User
*/ */

@ -208,6 +208,7 @@ public class plasmaGrafics {
int count = 0; int count = 0;
int totalCount = 0; int totalCount = 0;
Enumeration e = yacyCore.seedDB.seedsConnected(true, false, null, (float) 0.0); Enumeration e = yacyCore.seedDB.seedsConnected(true, false, null, (float) 0.0);
while (e.hasMoreElements() && count < maxCount) { while (e.hasMoreElements() && count < maxCount) {
seed = (yacySeed) e.nextElement(); seed = (yacySeed) e.nextElement();
if (seed != null) { if (seed != null) {

@ -7,7 +7,7 @@
// //
// $LastChangedDate$ // $LastChangedDate$
// $LastChangedRevision$ // $LastChangedRevision$
// $LastChangedBy: $ // $LastChangedBy$
// //
// This program is free software; you can redistribute it and/or modify // 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 // 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) { public static boolean noIndexingURL(String urlString) {
if (urlString == null) return false; if (urlString == null) return false;
urlString = urlString.toLowerCase(); urlString = urlString.toLowerCase();
// return (
// (urlString.endsWith(".gz")) || //http://www.yacy.net/getimage.php?image.png
// (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"))
// );
int idx = urlString.indexOf("?"); int idx = urlString.indexOf("?");
if (idx > 0) urlString = urlString.substring(0,idx); if (idx > 0) urlString = urlString.substring(0,idx);
//http://www.yacy.net/getimage.php
idx = urlString.lastIndexOf("."); idx = urlString.lastIndexOf(".");
if (idx > 0) urlString = urlString.substring(idx+1); if (idx > 0) urlString = urlString.substring(idx+1);
//php
return plasmaParser.mediaExtContains(urlString); return plasmaParser.mediaExtContains(urlString);
} }
/* /**
* This function moves an old cached object (if it exists) to the new position * This function moves an old cached object (if it exists) to the new position
*/ */
private void moveCachedObject(File oldpath, File newpath) { private void moveCachedObject(File oldpath, File newpath) {

@ -6,7 +6,7 @@
// //
// $LastChangedDate$ // $LastChangedDate$
// $LastChangedRevision$ // $LastChangedRevision$
// $LastChangedBy: $ // $LastChangedBy$
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -535,7 +535,7 @@ public final class yacySeedDB {
if (seed != null) { if (seed != null) {
addressStr = seed.getAddress(); addressStr = seed.getAddress();
if (addressStr == null) { 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; continue;
} }
if ((pos = addressStr.indexOf(":"))!= -1) { if ((pos = addressStr.indexOf(":"))!= -1) {

Loading…
Cancel
Save