diff --git a/htroot/IndexBrowser_p.html b/htroot/IndexBrowser_p.html index 6843dba02..9ccd6baae 100644 --- a/htroot/IndexBrowser_p.html +++ b/htroot/IndexBrowser_p.html @@ -170,7 +170,7 @@ var solr= $.getJSON("solr/collection1/select?q=*:*&start=0&rows=0&wt=json&facet= Browser for #[path]# diff --git a/htroot/IndexBrowser_p.java b/htroot/IndexBrowser_p.java index 58f9be452..bf66476f0 100644 --- a/htroot/IndexBrowser_p.java +++ b/htroot/IndexBrowser_p.java @@ -666,10 +666,17 @@ public class IndexBrowser_p { if (hoststr.startsWith("www.")) { // to allow the automatic matching for www.host.com and host.com hoststr = hoststr.substring(4); } - addBlacklistEntry( + final boolean isok = addBlacklistEntry( blacklistname, hoststr + "/.*"); // as yacy expands host pattern to match www.host.com as well as host.com no need to prefix with "*." + if (isok) { + prop.put("files_blkadded", 1); // glyphicon-ok on (display) + } else { + prop.put("files_blkadded", 2); // failure - glypicon-remove on + } } + } else { + prop.put("files_blkadded", 0); // glyphicon-ok off } } diff --git a/source/net/yacy/repository/BlacklistHelper.java b/source/net/yacy/repository/BlacklistHelper.java index 965306358..8c076c3db 100644 --- a/source/net/yacy/repository/BlacklistHelper.java +++ b/source/net/yacy/repository/BlacklistHelper.java @@ -58,7 +58,7 @@ public final class BlacklistHelper { * Adds a new entry to the chosen blacklist. * @param blacklistToUse the name of the blacklist the entry is to be added to * @param entry the entry that is to be added - * @return true when no error occurred and the entry was successfully added + * @return true when no error occurred and the entry was successfully added or exists */ public static boolean addBlacklistEntry( final String blacklistToUse,