DataObjects/Events.php
[Pman.Core] / DataObjects / Events.php
index 168699c..d1dba13 100644 (file)
@@ -629,31 +629,21 @@ class Pman_Core_DataObjects_Events extends DB_DataObject
             if (!is_a($table,'DB_DataObject')) {
                 continue;
             }
-            print_R($table->keys());exit;
-            $affects  = array();
-        
-            $all_links = $GLOBALS['_DB_DATAOBJECT']['LINKS'][$this->_database];
-
-            foreach($all_links as $tbl => $links) {
-                foreach($links as $col => $totbl_col) {
-                    $to = explode(':', $totbl_col);
-                    if ($to[0] != $this->tableName()) {
-                        continue;
-                    }
-
-                    $affects[$tbl .'.' . $col] = $table->tableName();
-                }
-            }
             
             unset($d['_table']);
             
             $table->setFrom($d);
             
-            print_R($affects);exit;
+            /*
+             * need to use the old id
+             */
+            $table->id = $d['id'];
             
+            $table->sequenceKey(false,false);
+            
+            $table->insert();     
         }
         
-        print_R($log);exit;
-        
+        $roo->jok('RESTORE');
     }
 }