You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/01/23 17:07:57 UTC
svn commit: r499062 -
/lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java
Author: andreas
Date: Tue Jan 23 08:07:56 2007
New Revision: 499062
URL: http://svn.apache.org/viewvc?view=rev&rev=499062
Log:
Fix sitetree API call in fragment generator
Modified:
lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java
Modified: lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java?view=diff&rev=499062&r1=499061&r2=499062
==============================================================================
--- lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java (original)
+++ lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java Tue Jan 23 08:07:56 2007
@@ -227,14 +227,15 @@
SiteStructure site = this.publication.getArea(this.area).getSite();
- SiteNode node = site.getNode(this.path);
- if (this.getLogger().isDebugEnabled()) {
- this.getLogger().debug("Node with path " + this.path + " found.");
+ SiteNode[] children;
+
+ if (this.path.equals("/")) {
+ children = site.getTopLevelNodes();
+ }
+ else {
+ SiteNode node = site.getNode(this.path);
+ children = node.getChildren();
}
- if (node == null)
- throw new SiteException("Node with path " + this.path + " not found.");
-
- SiteNode[] children = node.getChildren();
addNodes(children);
} catch (PublicationException e) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org