AD7six wrote:
> 
> I think it is simply a question of complexity as to why that isn´t
> included.
> 
> Probably best to attach your comment/fix to this:
> https://trac.cakephp.org/ticket/1235

I was just looking at those ticket and thinking about improving with
comments :)

> But before you do...Does your removed-if-fix work fine in that it
> doesn´t generate sql/cake errors or does it work fine in that the end
> result is a valid tree? I think the result is likely to be a corrupted
> tree looking at the rest of the setParent code.

I've made some tests and it seems to keep the right tree. Notice that I
said it seems. I'm not very ACL proof and for me everything is ok but I
prefer to refer me to someone more ACL-Friend than me.

> Although it is more SQL work I would say it would be better to make it
> an orphan, and /then/ set the parent to be the one that you want. That
> way the lft and rght fields will have the correct values for everything
> under the original parent.

I've tried to delete the the node and then to create again and setting
the new parent, but when I do that, it's also deleted all the aros_acos
I gave to that user. I've tried something like

   $this->Aro->recursive = 0;

before deleting but then I noticed that inside the delete() method
there's no check against the "recursivity"[1].

Bye and thanks
Davide

1. http://api.cakephp.org/aclnode_8php-source.html#l00101


-- 
By the power of Greyskull...

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to