mirror of
https://github.com/yacy/yacy_search_server.git
synced 2026-10-25 05:54:15 +00:00
Improvements and bugfixes for recording actions of blacklist API.
This commit is contained in:
1 parent
0ba6b98d5b
commit
f443cfa32d
3 files changed
+31
-5
No files matched your search
+20
-1
@@ -197,6 +197,12 @@ public class Blacklist_p {
|
||||
blacklistToUse = post.get("currentBlacklist", "").trim();
|
||||
|
||||
final String[] selectedBlacklistEntries = post.getAll("selectedEntry.*");
|
||||
|
||||
// store this call as api call
|
||||
ListManager.switchboard.tables.recordAPICall(post,
|
||||
"Blacklist_p.html",
|
||||
WorkTables.TABLE_API_TYPE_CONFIGURATION,
|
||||
"delete from blacklist '" + blacklistToUse + "': " + Arrays.toString(selectedBlacklistEntries));
|
||||
|
||||
if (selectedBlacklistEntries.length > 0) {
|
||||
String temp = null;
|
||||
@@ -221,7 +227,11 @@ public class Blacklist_p {
|
||||
final String blentry = post.get("newEntry", "").trim();
|
||||
|
||||
// store this call as api call
|
||||
ListManager.switchboard.tables.recordAPICall(post, "Blacklist_p.html", WorkTables.TABLE_API_TYPE_CONFIGURATION, "add to blacklist: " + blentry);
|
||||
ListManager.switchboard.tables.recordAPICall(
|
||||
post,
|
||||
"Blacklist_p.html",
|
||||
WorkTables.TABLE_API_TYPE_CONFIGURATION,
|
||||
"add to blacklist '" + blacklistToUse + "': " + blentry);
|
||||
|
||||
final String temp = BlacklistHelper.addBlacklistEntry(blacklistToUse, blentry, header);
|
||||
if (temp != null) {
|
||||
@@ -242,6 +252,15 @@ public class Blacklist_p {
|
||||
final String targetBlacklist = post.get("targetBlacklist");
|
||||
|
||||
final String[] selectedBlacklistEntries = post.getAll("selectedEntry.*");
|
||||
|
||||
// store this call as api call
|
||||
ListManager.switchboard.tables.recordAPICall(
|
||||
post,
|
||||
"Blacklist_p.html",
|
||||
WorkTables.TABLE_API_TYPE_CONFIGURATION,
|
||||
"move from blacklist '" + blacklistToUse
|
||||
+ "' to blacklist '" + targetBlacklist + "': "
|
||||
+ Arrays.toString(selectedBlacklistEntries));
|
||||
|
||||
if (selectedBlacklistEntries != null &&
|
||||
selectedBlacklistEntries.length > 0 &&
|
||||
|
||||
@@ -25,9 +25,12 @@ public class add_entry_p {
|
||||
final String blacklistToUse = post.get(KEY_CURRENT_BLACKLIST, "").trim();
|
||||
final String entry = post.get(KEY_NEW_ENTRY, "").trim();
|
||||
|
||||
// store this call as api call
|
||||
ListManager.switchboard.tables.recordAPICall(post, "add_entry_p.xml", WorkTables.TABLE_API_TYPE_CONFIGURATION, "add to blacklist: " + entry);
|
||||
|
||||
ListManager.switchboard.tables.recordAPICall(
|
||||
post,
|
||||
"add_entry_p." + header.fileType().toString().toLowerCase(),
|
||||
WorkTables.TABLE_API_TYPE_CONFIGURATION,
|
||||
"add to blacklist '" + blacklistToUse + "': " + entry);
|
||||
|
||||
if (BlacklistHelper.addBlacklistEntry(blacklistToUse, entry, header) == null) {
|
||||
prop.put(XML_ITEM_STATUS, RESULT_SUCCESS);
|
||||
|
||||
|
||||
@@ -26,7 +26,11 @@ public class delete_entry_p {
|
||||
final String entry = post.get(KEY_NEW_ENTRY, "").trim();
|
||||
|
||||
// store this call as api call
|
||||
ListManager.switchboard.tables.recordAPICall(post, "add_entry_p.xml", WorkTables.TABLE_API_TYPE_CONFIGURATION, "add to blacklist: " + entry);
|
||||
ListManager.switchboard.tables.recordAPICall(
|
||||
post,
|
||||
"delete_entry_p." + header.fileType().toString().toLowerCase(),
|
||||
WorkTables.TABLE_API_TYPE_CONFIGURATION,
|
||||
"delete from blacklist '" + blacklistToUse + "': " + entry);
|
||||
|
||||
if (BlacklistHelper.deleteBlacklistEntry(blacklistToUse, entry, header) == null) {
|
||||
prop.put(XML_ITEM_STATUS, RESULT_SUCCESS);
|
||||
|
||||
Reference in new issue
Block a user