DataObjects/Events.php
authorEdward <edward@roojs.com>
Tue, 14 Jul 2015 07:04:44 +0000 (15:04 +0800)
committerEdward <edward@roojs.com>
Tue, 14 Jul 2015 07:04:44 +0000 (15:04 +0800)
DataObjects/Events.php

index a628da6..fc4367d 100644 (file)
@@ -412,6 +412,13 @@ class Pman_Core_DataObjects_Events extends DB_DataObject
         }
     }
     
+    function beforeUpdate($old, $request,$roo)
+    {
+        if(!empty($request['_restore'])){
+            $this->restore();
+        }
+    }
+    
     function onInsert($request,$roo)
     {
         $this->writeEventLog();