svn commit: r561936 - /lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/TreeNodeImpl.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: rfrovarp
Date: Wed Aug  1 13:15:18 2007
New Revision: 561936

URL: http://svn.apache.org/viewvc?view=rev&rev=561936
Log:
Correctly retrieves list of preceding siblings now. Can now move node up to top position in a substree.

Modified:
    lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/TreeNodeImpl.java

Modified: lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/TreeNodeImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/TreeNodeImpl.java?view=diff&rev=561936&r1=561935&r2=561936
==============================================================================
--- lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/TreeNodeImpl.java (original)
+++ lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/TreeNodeImpl.java Wed Aug  1 13:15:18 2007
@@ -171,7 +171,7 @@
         SiteNode[] children = this.parent.getChildren();
         int pos = Arrays.asList(children).indexOf(this);
         List siblings = new ArrayList();
-        for (int i = 0; i < pos - 1; i++) {
+        for (int i = 0; i < pos ; i++) {
             siblings.add(children[i]);
         }
         return (SiteTreeNode[]) siblings.toArray(new TreeNodeImpl[siblings.size()]);
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.