]> git.andy128k.dev Git - ipf-legacy-orm.git/commitdiff
update to conform to latest IPF
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 10 Mar 2019 14:53:18 +0000 (15:53 +0100)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 10 Mar 2019 14:53:18 +0000 (15:53 +0100)
src/commands/fixtures.php

index 3c6e279291b49385090b02b015d2381e77995d94..746d22ff47e02aba9b65f4929273261dba38c56f 100644 (file)
@@ -11,9 +11,9 @@ class IPF_Legacy_ORM_Command_Fixtures
 
         $project = IPF_Project::getInstance();
 
-        $paths = array(IPF::get('project_path'));
+        $paths = array(IPF::get('project_root').DIRECTORY_SEPARATOR.'project');
         foreach ($project->appList() as $app)
-            $paths[] = $app->path;
+            $paths[] = $app->getPath();
 
         $fixtures = array();
         foreach ($paths as $path) {
@@ -55,7 +55,7 @@ class IPF_Legacy_ORM_Command_Fixtures
                     $model = new $modelClass;
 
                 foreach ($record as $k => $v)
-                    $model->$k = $v;
+                    $model->{$k} = $v;
 
                 $model->save();
                 echo '.';