Skip to content

Commit

Permalink
addes has_descendants
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenvanvliet committed Jun 4, 2008
1 parent 40c0a64 commit 5b1af2d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ORM_Mptt.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ function insert_as_last_child_of($parent_node)

return $this;
}

/**
* Test to see if node has children
*
* @return boolean
*/
function has_descendants()
{
return (($this->model->{$this->right_column} - $this->model->{$this->left_column}) > 1);
}
protected function modify_node($node_int, $changeVal)
{
$leftcol = $this->left_column;
Expand Down

0 comments on commit 5b1af2d

Please sign in to comment.