- fix for changed blacklist types

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3857 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
karlchenofhell 18 years ago
parent b315cb9a81
commit 71ca9aa6d4

@ -24,6 +24,7 @@ import java.util.ArrayList;
import de.anomic.data.listManager;
import de.anomic.http.httpHeader;
import de.anomic.plasma.urlPattern.abstractURLPattern;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
@ -48,26 +49,15 @@ public class blacklists_p {
} else {
prop.put("lists_" + blacklistCount + "_shared", 0);
}
if (listManager.ListInListslist("dht" + ".BlackLists",dirlist[i])) {
prop.put("lists_" + blacklistCount + "_dht", 1);
} else {
prop.put("lists_" + blacklistCount + "_dht", 0);
}
if (listManager.ListInListslist("crawler" + ".BlackLists",dirlist[i])) {
prop.put("lists_" + blacklistCount + "_crawler", 1);
} else {
prop.put("lists_" + blacklistCount + "_crawler", 0);
}
if (listManager.ListInListslist("proxy" + ".BlackLists",dirlist[i])) {
prop.put("lists_" + blacklistCount + "_proxy", 1);
} else {
prop.put("lists_" + blacklistCount + "_proxy", 0);
}
if (listManager.ListInListslist("search" + ".BlackLists",dirlist[i])) {
prop.put("lists_" + blacklistCount + "_search", 1);
} else {
prop.put("lists_" + blacklistCount + "_search", 0);
String[] types = abstractURLPattern.BLACKLIST_TYPES_STRING.split(",");
for (int j=0; j<types.length; j++) {
prop.put("lists_" + blacklistCount + "_types_" + j + "_name", types[j]);
prop.put("lists_" + blacklistCount + "_types_" + j + "_value",
listManager.ListInListslist(types[j] + ".Blacklist", dirlist[i]) ? 1 : 0);
}
prop.put("lists_" + blacklistCount + "_types", types.length);
list = listManager.getListArray(new File(listManager.listsPath, dirlist[i]));
count=0;

@ -1,7 +1,8 @@
<?xml version="1.0"?>
<blacklists>
#{lists}#
<list name="#[name]#" shared="#[shared]#" proxy="#[proxy]#" crawler="#[crawler]#" dht="#[dht]#" search="#[search]#">
<list name="#[name]#" shared="#[shared]#" #{types}#
#[name]#="#[value]#"#{/types}#>
#{items}#
<item>#[item]#</item>
#{/items}#

@ -70,6 +70,7 @@ import org.w3c.dom.Document;
import de.anomic.data.listManager;
import de.anomic.net.URL;
import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.plasma.urlPattern.abstractURLPattern;
import de.anomic.plasma.urlPattern.plasmaURLPattern;
import de.anomic.server.serverObjects;
import de.anomic.soap.AbstractService;
@ -526,7 +527,7 @@ public class BlacklistService extends AbstractService {
*/
private String[] getSupportedBlacklistTypeArray() {
String supportedBlacklistTypesStr = this.switchboard.getConfig(BLACKLISTS_TYPES, "");
String supportedBlacklistTypesStr = abstractURLPattern.BLACKLIST_TYPES_STRING;
String[] supportedBlacklistTypeArray = supportedBlacklistTypesStr.split(",");
return supportedBlacklistTypeArray;
}

Loading…
Cancel
Save