How to delete an MPTT Node
03 Sep 2006
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)...
Where did I put that call?
02 Sep 2006
In the site update, this little tidbit went missing, so here it is again:
function pr($var) { if (DEBUG > 0) { $array = debug_backtrace(); echo(str_replace(ROOT, "", $array[0]['file'])." (line ".$array[0]['line'].")"); echo "<pre>"; print_r($var); echo "</pre>"; } }function pr($var) {if (DEBUG > 0) {$array = debug_backtrace();echo(str_replace(ROOT, "", $array[0]['file'])." (line ".$array[0]['line'].")");echo "<pre>";print_r($var);echo "</pre>";}}
With this minor change, you can see where your debug calls are...