Author: david
Date: Fri Feb 11 17:38:50 2011
New Revision: 8964

Log:
Fix counting bug for rgt values

Modified:
   trunk/lib/task/nestedsetBuildTask.class.php

Modified: trunk/lib/task/nestedsetBuildTask.class.php
==============================================================================
--- trunk/lib/task/nestedsetBuildTask.class.php Fri Feb 11 17:27:13 2011        
(r8963)
+++ trunk/lib/task/nestedsetBuildTask.class.php Fri Feb 11 17:38:50 2011        
(r8964)
@@ -112,14 +112,15 @@
       {
         $child = array('id' => $id, 'lft' => $lft, 'rgt' => null, 'children' 
=> array());
         
-        $width = self::addChildren($child, $infoObjects, $lft);
-        $lft += $width;
+        $w0 = self::addChildren($child, $infoObjects, $lft);
+        $lft += $w0;
+        $width += $w0;
 
         array_push($node['children'], $child);
       }
     }
 
-    $node['rgt'] = $lft + 1;
+    $node['rgt'] = $node['lft'] + $width - 1;
 
     return $width;
   }

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to