PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_NestedSet » Bug #281

moving root nodes (level 1) to level 2 nodes

Details

Submitted2003-11-21 03:06 UTC
Frombeat dot kipfer at balcab dot ch
Assigneddatenpunk
StatusClosed
PackageDB_NestedSet
PHP VersionIrrelevant
OSlinux
Roadmaps(Not assigned)

Comments

[2003-11-21 03:06 UTC] beat dot kipfer at balcab dot ch

Description:
------------
I built up a simple nested set with 3 levels. after moving a level 2 node to level 1 i couldn't move it back to level 2. i think the problem is, that this situation has been interpreted as 'root2root move'.

if it is a 'rooot2root move' it will not work together with the 'SUB' as position in the moveTree function.

hope I'm not wrong.

Reproduce code:
---------------
$rn1 = $nSet->createRootNode($data,false,true);
$rn2 = $nSet->createRootNode($data,false,true);
$n1_1 = $nSet->createSubNode($rn1,$data);
$n1_2 = $nSet->createSubNode($rn1,$data);
$n2_2 = $nSet->createSubNode($rn2,$data);
$n2_2_1 = $nSet->createSubNode($rn2_2,$data);
$nSet->setObj->moveTree($n2_2_1,rn1,'BE',false);
$nSet->setObj->moveTree($n2_2_1,$n2_2,'SUB',false);

[2003-11-21 06:42 UTC] datenpunk at php dot net

A fix was allready sent in and this bug will be fixed shortly.

[2003-11-26 19:37 UTC] datenpunk at php dot net

This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.

Thank you for the report, and for helping us make PEAR better.