Author: andre
Date: 2009-11-23 22:20:25 +0100 (Mon, 23 Nov 2009)
New Revision: 39871

Modified:
   openimages/trunk/src/main/java/eu/openimages/DeleteTranslationsProcessor.java
Log:
when nodemanager name was null to much was deleted

Modified: 
openimages/trunk/src/main/java/eu/openimages/DeleteTranslationsProcessor.java
===================================================================
--- 
openimages/trunk/src/main/java/eu/openimages/DeleteTranslationsProcessor.java   
    2009-11-23 21:16:50 UTC (rev 39870)
+++ 
openimages/trunk/src/main/java/eu/openimages/DeleteTranslationsProcessor.java   
    2009-11-23 21:20:25 UTC (rev 39871)
@@ -52,11 +52,10 @@
             LOG.service("Not doing because of property");
             return;
         }
-        
-        if (node.getNumber() > 0) {
-            NodeList translations = SearchUtil.findRelatedNodeList(node, 
-                node.getNodeManager().getProperty("translations.builders"), 
"langrel");
-            LOG.info("Deleting " + translations.size() + " translations of #" 
+ node.getNumber());
+        String builder = 
node.getNodeManager().getProperty("translations.builder");
+        if (node.getNumber() > 0 && builder != null && !"".equals(builder)) {
+            NodeList translations = SearchUtil.findRelatedNodeList(node, 
builder, "langrel");
+            LOG.info("Deleting " + translations.size() + " " + builder + " of 
#" + node.getNumber());
             for (Node tr : translations) {
                 if (tr.mayDelete()) {
                     tr.delete(true);

_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to