Hide
on 26/3/07

In the past week, a lot happened to this site, and not all of it was good :). Where to begin... the development machine died (hopefully get it back today); I moved all the code from a backup onto my aging laptop, my previous host account expired; I changed hosts to Dreamhost, the update from my laptop to the live version included some code that doesn't work/isn't finished; I upgraded my cake version only to discover some of my code was incompatible; I decided to take advantage of having php5 as an option and discovered some of my code was not php5 compatible etc. etc. But anyway, enough about that, hopefully things are on the up :).

One of the things that unintentionally became visible during all this was a demo I've been working on to demonstrate and test the use of the new MPTT tree behavior. It has a few quirks for which I have written a patch and the demo also serves to test how well, or not, this patch functions. At the time of writing this post the code available for download won't work, but the demo itself at least is fully functional.

on 2/9/06

If you use MPTT tables anywhere (The cake acl system uses it) you may have found that when you delete an entry, the lft and rght fields for the neighouring nodes don't get updated. This may have rather dire concequences ;)

There is an open ticket for how to delete from the cake acl tables, but as it is potentially quite generic, I thought I'd include the (potential) fix here. Below are two versions of a delete method, one takes care of associations, and the other doesn't:

[Code]

Should anybody use this and find it causes a problem please let me know.