Dump.php
authorAlan Knowles <alan@akbkhome.com>
Mon, 21 Mar 2011 08:35:01 +0000 (16:35 +0800)
committerAlan Knowles <alan@akbkhome.com>
Mon, 21 Mar 2011 08:35:01 +0000 (16:35 +0800)
Dump.php

index 1836688..ca16d94 100644 (file)
--- a/Dump.php
+++ b/Dump.php
@@ -222,7 +222,24 @@ class Pman_Admin_Dump extends Pman {
     function discoverChildren($table, $where  )
     {
         global $_DB_DATAOBJECT;
-        $do = DB_DataObject::factory($table);
+         $x = DB_DataObject::factory($table);
+        if (PEAR::isError($do)) {
+            if (isset($this->dumps[$table])) {
+                unset($this->dumps[$table]); // links to non-existant tables..
+            }
+            return;
+        }
+        
+        $keys = $do->keys();
+          
+        if (is_array( $where)) {
+            $do->whereAddIn($keys[0] , $where, 'int');
+        } else {
+        
+            $do->whereAdd($where);
+        }
+        
+        
         // force load of linsk
         $do->links();
         foreach($_DB_DATAOBJECT['LINKS'][$do->database()] as $tbl => $links) {
@@ -248,6 +265,7 @@ class Pman_Admin_Dump extends Pman {
             
         }
         
+        while ($do->fech)
         
         print_R($children);exit;