*) new parameters for future use (better blacklist handling for im- and export)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5403 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 16 years ago
parent e34ac22fbd
commit 5a89266598

@ -36,10 +36,13 @@ public class blacklists {
final List<String> dirlist = listManager.getDirListing(listManager.listsPath);
int blacklistCount=0;
final String blackListName = post.get("listname", "");
List<String> list;
int count;
if (dirlist != null) {
for (String element : dirlist) {
if (blackListName.equals("") || element.equals(blackListName)) {
prop.putXML("lists_" + blacklistCount + "_name", element);
if (listManager.listSetContains("BlackLists.Shared", element)) {
@ -61,6 +64,7 @@ public class blacklists {
}
}
}
}
prop.put("lists", blacklistCount);
// return rewrite properties

@ -38,10 +38,13 @@ public class blacklists_p {
final List<String> dirlist = listManager.getDirListing(listManager.listsPath);
int blacklistCount=0;
final String blackListName = post.get("listname", "");
List<String> list;
int count;
if (dirlist != null) {
for (String element : dirlist) {
if (blackListName.equals("") || element.equals(blackListName)) {
prop.putXML("lists_" + blacklistCount + "_name", element);
if (listManager.listSetContains("BlackLists.Shared", element)) {
@ -74,6 +77,7 @@ public class blacklists_p {
blacklistCount++;
}
}
}
prop.put("lists", blacklistCount);

@ -45,6 +45,8 @@ public final class list {
if (post == null || env == null) throw new NullPointerException("post: " + post + ", sb: " + env);
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final String blackListName = post.get("listname", "");
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
if ((post == null) || (env == null)) return prop;
@ -73,11 +75,13 @@ public final class list {
if (filenamesarray.length > 0){
for (int i = 0;i < filenamesarray.length; i++) {
if (blackListName.equals("") || filenamesarray[i].equals(blackListName)) {
final String filename = filenamesarray[i];
final File fileObj = new File(listsPath,filename);
out.append(listManager.getListString(fileObj, false)).append(serverCore.CRLF_STRING);
}
}
}
prop.put("list",out.toString());
} else {

Loading…
Cancel
Save