*) 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.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) {

@ -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

@ -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
*/

@ -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) {

@ -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) {

@ -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) {

Loading…
Cancel
Save