1
0
mirror of synced 2025-02-07 15:59:27 +03:00

Fixed a bug in Doctrine_Node_NestedSet::getRootValue() and setRootValue(). They were still using underscore property names (roo_column_name, ...).

This commit is contained in:
romanb 2007-02-09 22:15:04 +00:00
parent 2922c9aff6
commit ee2c5f6231

View File

@ -709,8 +709,8 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int
*/ */
public function getRootValue() public function getRootValue()
{ {
if($this->record->getTable()->getTree()->getAttribute('has_many_roots')) if($this->record->getTable()->getTree()->getAttribute('hasManyRoots'))
return $this->record->get($this->record->getTable()->getTree()->getAttribute('root_column_name')); return $this->record->get($this->record->getTable()->getTree()->getAttribute('rootColumnName'));
return 1; return 1;
} }
@ -722,7 +722,7 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int
*/ */
public function setRootValue($value) public function setRootValue($value)
{ {
if($this->record->getTable()->getTree()->getAttribute('has_many_roots')) if($this->record->getTable()->getTree()->getAttribute('hasManyRoots'))
$this->record->set($this->record->getTable()->getTree()->getAttribute('root_column_name'), $value); $this->record->set($this->record->getTable()->getTree()->getAttribute('rootColumnName'), $value);
} }
} }