From a35855988215369ff11147ad1ed62dae798a1a1e Mon Sep 17 00:00:00 2001 From: zYne Date: Fri, 8 Jun 2007 19:29:01 +0000 Subject: [PATCH] --- lib/Doctrine/Record.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Doctrine/Record.php b/lib/Doctrine/Record.php index e3dee5428..c09d1e107 100644 --- a/lib/Doctrine/Record.php +++ b/lib/Doctrine/Record.php @@ -1541,6 +1541,12 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite return $this->_node; } + public function revert($version) + { + $data = $this->_table->getAuditLog()->getVersion($this, $version); + + $this->_data = $data[0]; + } /** * used to delete node from tree - MUST BE USE TO DELETE RECORD IF TABLE ACTS AS TREE *