DataObjects/core.sql
[Pman.Core] / UpdateDatabase.php
index dbc3377..91c3fad 100644 (file)
@@ -511,9 +511,11 @@ class Pman_Core_UpdateDatabase extends Pman
             if (!preg_match('/^json-/', $o) || empty($v)) {
                 continue;
             }
-            $type = str_replace('_', '-', substr($o,6));
-            $data= json_decode(file_get_contents($file),true);
-            DB_DataObject::factory($type)->importFromArray($this,$data,$opts);
+            $type = str_replace('_', '-', substr($o,5));
+            
+            $data= json_decode(file_get_contents($v),true);
+            $pg = HTML_FlexyFramework::get()->page;
+            DB_DataObject::factory($type)->importFromArray($pg ,$data,$opts);
             
         }
         
@@ -561,6 +563,7 @@ class Pman_Core_UpdateDatabase extends Pman
     {
         
         $enum = DB_DataObject::Factory('core_enum');
+        //DB_DAtaObject::debugLevel(1);
         $enum->initEnums(
             array(
                 array(