1
0
mirror of synced 2025-02-20 22:23:14 +03:00

Fixed issue with isValidNode() and it not accepting an argument when it should allow it.

This commit is contained in:
Jonathan.Wage 2007-05-17 19:52:50 +00:00
parent 6f466c3f9c
commit a1ef5fbf4b

View File

@ -660,9 +660,13 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int
*
* @return bool
*/
public function isValidNode()
public function isValidNode(Doctrine_Record $record = null)
{
return ($this->getRightValue() > $this->getLeftValue());
if ($record === null) {
return ($this->getRightValue() > $this->getLeftValue());
} else {
return ($record->getNode()->getRightValue() > $record->getNode()->getLeftValue());
}
}
/**