From f443cfa32d6ac5ca0fb9eaa0570c002bb0721659 Mon Sep 17 00:00:00 2001 From: Marc Nause Date: Tue, 17 Jun 2014 22:54:47 +0200 Subject: [PATCH 1/2] Improvements and bugfixes for recording actions of blacklist API. --- htroot/Blacklist_p.java | 21 ++++++++++++++++++++- htroot/api/blacklists/add_entry_p.java | 9 ++++++--- htroot/api/blacklists/delete_entry_p.java | 6 +++++- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/htroot/Blacklist_p.java b/htroot/Blacklist_p.java index 2f426877f..17068b124 100644 --- a/htroot/Blacklist_p.java +++ b/htroot/Blacklist_p.java @@ -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 && diff --git a/htroot/api/blacklists/add_entry_p.java b/htroot/api/blacklists/add_entry_p.java index f44e2f132..270b52d03 100644 --- a/htroot/api/blacklists/add_entry_p.java +++ b/htroot/api/blacklists/add_entry_p.java @@ -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); diff --git a/htroot/api/blacklists/delete_entry_p.java b/htroot/api/blacklists/delete_entry_p.java index e6a23366a..9e7cf1ed5 100644 --- a/htroot/api/blacklists/delete_entry_p.java +++ b/htroot/api/blacklists/delete_entry_p.java @@ -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); From 5043eff33aebcfeaa967d474a7a6823a5df2f59f Mon Sep 17 00:00:00 2001 From: reger Date: Fri, 20 Jun 2014 01:02:43 +0200 Subject: [PATCH 2/2] move page navigation below results (image search) force page navigation to be displayed below results in image search for any number of displayed images instead to be displayed to the right of last image. --- htroot/yacysearch.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html index da44fbb5b..188ed91fa 100644 --- a/htroot/yacysearch.html +++ b/htroot/yacysearch.html @@ -187,8 +187,8 @@ document.getElementById("Enter").innerHTML = "search again"; #(num-results)# :: :: - :: - + :: + :: #(/num-results)#