Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix for news-deletion, see also http://www.yacy-forum.de/viewtopic.php?p=11000#11000

orbiterd666b61b8311
diff --git a/htroot/News.java b/htroot/News.java
index f6f86e57c..a60fa8c31 100644
--- a/htroot/News.java
+++ b/htroot/News.java
@@ -56,6 +56,7 @@ import de.anomic.server.serverDate;
import de.anomic.yacy.yacyCore;
import de.anomic.yacy.yacySeed;
import de.anomic.yacy.yacyNewsRecord;
+import de.anomic.yacy.yacyNewsPool;
public class News {
@@ -95,7 +96,7 @@ public class News {
}
yacyNewsRecord record;
try {
- if ((tableID == 2) || (tableID == 4)) {
+ if ((tableID == yacyNewsPool.PROCESSED_DB) || (tableID == yacyNewsPool.PUBLISHED_DB)) {
yacyCore.newsPool.clear(tableID);
} else {
while (yacyCore.newsPool.size(tableID) > 0) {
diff --git a/source/de/anomic/yacy/yacyNewsPool.java b/source/de/anomic/yacy/yacyNewsPool.java
index 9daead131..a2ce939b5 100644
--- a/source/de/anomic/yacy/yacyNewsPool.java
+++ b/source/de/anomic/yacy/yacyNewsPool.java
@@ -267,7 +267,7 @@ public class yacyNewsPool {
// called if a published news shall be removed
yacyNewsRecord record = fromqueue.remove(id);
if (record == null) return false;
- toqueue.push(record);
+ if (toqueue != null) toqueue.push(record);
return true;
}