1
0
mirror of synced 2024-12-13 22:56:04 +03:00
Ticket: 328
This commit is contained in:
romanb 2007-06-07 19:17:56 +00:00
parent bc717ac900
commit 42170dd406

View File

@ -171,12 +171,15 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int
public function fetchBranch($pk, $options = array())
{
$record = $this->table->find($pk);
if ( ! ($record instanceof Doctrine_Record)) {
// TODO: if record doesn't exist, throw exception or similar?
return false;
}
if ($record->exists()) {
$options = array_merge(array('include_record'=>true), $options);
return $record->getNode()->traverse('Pre', $options);
}
// TODO: if record doesn't exist, throw exception or similar?
}
/**