Nested Intervals Bugs

If this is the incorrect place for a posting of this sort I apologize in advance.

I’ve been working on incorporating the nested intervals extension into a project I’ve been working on. The behavior pretty much works as it should, however I believe that I’ve uncovered a couple of bugs. I haven’t found a bug reporting system to submit the issues to, and this forum software apparently disallows me from posting directly on the extension’s page with my findings (since my account is “too new”), so I have come here.

The issues:

  1. Function move() does not use NI key column name aliases

In the function move(), the return which generates four CDbExpression objects is not using the object properties $this->nv, $this->dv, $this->sdv, $this->sdv for the nv, dv, snv, and sdv column names in the SQL fragments it is generating. Instead it is hardcoding "nv", "dv", "snv", and "sdv" into the SQL, which will fail if the table schema is using different names for these respective columns.

  1. Unable to delete root nodes

Calling deleteNode() on a node which is a root node fails with an exception: “Cannot get node’s parent quadruple; node is a root note”. This exception is thrown because deleteNode() makes a call to mockParent(), which makes a call to parentQuadruple(), which actually throws the exception. parentQuadruple() is acting logically, I would think, since it’s logically impossible to have a parent for a root element. Therefore, I would suggest that the logic in mockParent() be changed to detect whether or not the node that it is acting on is a root node, and if it is a root node then the “parent” is the node itself.