svn commit: r591841 - /lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Sun Nov  4 13:38:12 2007
New Revision: 591841

URL: http://svn.apache.org/viewvc?rev=591841&view=rev
Log:
AreaImpl.getDocuments(): Don't try to obtain docs from non-UUID site nodes

Modified:
    lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java

Modified: lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java?rev=591841&r1=591840&r2=591841&view=diff
==============================================================================
--- lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java (original)
+++ lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java Sun Nov  4 13:38:12 2007
@@ -126,12 +126,14 @@
         SiteNode[] nodes = getSite().getNodes();
         List docs = new ArrayList();
         for (int i = 0; i < nodes.length; i++) {
-            String[] langs = nodes[i].getLanguages();
-            for (int l = 0; l < langs.length; l++) {
-                try {
-                    docs.add(nodes[i].getLink(langs[l]).getDocument());
-                } catch (SiteException e) {
-                    throw new RuntimeException(e);
+            if (nodes[i].getUuid() != null) {
+                String[] langs = nodes[i].getLanguages();
+                for (int l = 0; l < langs.length; l++) {
+                    try {
+                        docs.add(nodes[i].getLink(langs[l]).getDocument());
+                    } catch (SiteException e) {
+                        throw new RuntimeException(e);
+                    }
                 }
             }
         }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.