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