Author: jflesch
Date: 2007-04-23 21:47:07 +0000 (Mon, 23 Apr 2007)
New Revision: 12905
Modified:
trunk/apps/Thaw/src/thaw/plugins/index/Comment.java
trunk/apps/Thaw/src/thaw/plugins/index/IndexManagementHelper.java
Log:
Try to fix nextgens NPE + disable the button to reset comments if we don't have
the private key of the index
Modified: trunk/apps/Thaw/src/thaw/plugins/index/Comment.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/index/Comment.java 2007-04-23 18:26:30 UTC
(rev 12904)
+++ trunk/apps/Thaw/src/thaw/plugins/index/Comment.java 2007-04-23 21:47:07 UTC
(rev 12905)
@@ -238,6 +238,9 @@
public boolean mustBeIgnored(Config config) {
+ if (author == null) /* fix nextgens weird case */
+ return true;
+
return author.mustBeIgnored(config);
}
Modified: trunk/apps/Thaw/src/thaw/plugins/index/IndexManagementHelper.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/index/IndexManagementHelper.java
2007-04-23 18:26:30 UTC (rev 12904)
+++ trunk/apps/Thaw/src/thaw/plugins/index/IndexManagementHelper.java
2007-04-23 21:47:07 UTC (rev 12905)
@@ -411,7 +411,7 @@
JPanel commentPanel = new JPanel(new BorderLayout());
commentPanel.add(allowCommentsBox, BorderLayout.CENTER);
- if (index != null)
+ if (index != null && index.getPrivateKey() != null)
commentPanel.add(resetCommentsButton,
BorderLayout.EAST);