Properties;

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@790 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
(no author) 19 years ago
parent 694226d4b1
commit 1aa79f5bb5

@ -6,7 +6,10 @@
// Frankfurt, Germany, 2004
//
// This File is contributed by Alexander Schier
// last change: 18.06.2004
//
// $LastChangedDate$
// $LastChangedRevision$
// $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
@ -42,11 +45,10 @@
// Contributions and changes to the program code must be marked as such.
// You must compile this file with
// javac -classpath .:../../Classes list.java
// javac -classpath .:../../classes list.java
// if the shell's current path is HTROOT
import java.io.File;
import de.anomic.data.listManager;
import de.anomic.http.httpHeader;
import de.anomic.server.serverCore;
@ -56,33 +58,32 @@ import de.anomic.server.serverSwitch;
public class list {
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
// return variable that accumulates replacements
serverObjects prop = new serverObjects();
String col = (String) post.get("col", "");
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
final String col = (String) post.get("col", "");
final File listsPath = new File(env.getRootPath(),env.getConfig("listsPath", "DATA/LISTS"));
if (col.equals("black")) {
String filename = "";
final StringBuffer out = new StringBuffer();
File listsPath = new File(env.getRootPath(),env.getConfig("listsPath", "DATA/LISTS"));
final String filenames=env.getConfig("proxyBlackListsShared", "");
final String[] filenamesarray = filenames.split(",");
if (col.equals("black")) {
String filename = "";
String line;
String out = "";
String filenames=env.getConfig("proxyBlackListsShared", "");
String filenamesarray[] = filenames.split(",");
if(filenamesarray.length >0){
for(int i = 0;i <= filenamesarray.length -1; i++){
filename = filenamesarray[i];
out.append(listManager.getListString(new File(listsPath,filename).toString(), false)).append(serverCore.crlfString);
}
} // if filenamesarray.length >0
if(filenamesarray.length >0){
for(int i = 0;i <= filenamesarray.length -1; i++){
filename = filenamesarray[i];
out += listManager.getListString(new File(listsPath,filename).toString(), false) + serverCore.crlfString;
}
}//if filenamesarray.length >0
prop.put("list",out);
} else {
prop.put("list","");
}
prop.put("list",out);
} else {
prop.put("list","");
}
return prop;
return prop;
}
}
}
Loading…
Cancel
Save