Commit ee2c5f62 authored by romanb's avatar romanb

Fixed a bug in Doctrine_Node_NestedSet::getRootValue() and setRootValue()....

Fixed a bug in Doctrine_Node_NestedSet::getRootValue() and setRootValue(). They were still using underscore property names (roo_column_name, ...).
parent 2922c9af
...@@ -709,8 +709,8 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int ...@@ -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 ...@@ -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);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment