UpdateDatabase.php
authorEdward <edward@roojs.com>
Wed, 22 May 2013 07:29:16 +0000 (15:29 +0800)
committerEdward <edward@roojs.com>
Wed, 22 May 2013 07:29:16 +0000 (15:29 +0800)
UpdateDatabase.php

index 048d3f5..74f2bd9 100644 (file)
@@ -61,15 +61,7 @@ class Pman_Core_UpdateDatabase extends Pman
                 die("Missing Source directory for json files or prefix for the passwrod! Try -f [JSON file path] -p [prefix] \n");
             }
             
-            $uinfo = posix_getpwuid( posix_getuid () ); 
-            $file = $uinfo['dir'] ."/gitlive/Pman.Xtuple.Migrate/base_install_data/{$opt['source']}";
-            if (!file_exists($file)) {
-                die("can not found person json file : $file\n");
-            }
-            
-            $persons = json_decode(file_get_contents($file),true);
-            
-            print_r($persons);exit;
+            DB_DataObject::factory('person')->createPerson();
             die("DONE!");
         }
         $this->importSQL();