diff --git a/core/components/migx/processors/mgr/migxconfigs/importfrompackage.php b/core/components/migx/processors/mgr/migxconfigs/importfrompackage.php index 87d7dcf..cfcb65d 100644 --- a/core/components/migx/processors/mgr/migxconfigs/importfrompackage.php +++ b/core/components/migx/processors/mgr/migxconfigs/importfrompackage.php @@ -3,7 +3,8 @@ $config = $modx->migx->customconfigs; $prefix = $config['prefix']; $packageName = $config['packageName']; -$packagepath = $modx->getOption('core_path') . 'components/' . $packageName . '/'; +//$packagepath = $modx->getOption('core_path') . 'components/' . $packageName . '/'; +$packagepath = $modx->migx->findPackagePath($packageName); $modelpath = $packagepath . 'model/'; $modx->addPackage($packageName, $modelpath, $prefix); $classname = $config['classname']; @@ -12,7 +13,7 @@ $packageName = $modx->getOption('package', $scriptProperties, ''); if (!empty($packageName)) { - $packagepath = $modx->getOption('core_path') . 'components/' . $packageName . '/'; + //$packagepath = $modx->getOption('core_path') . 'components/' . $packageName . '/'; $configpath = $packagepath . 'migxconfigs/'; if (is_dir($configpath)) { if ($handle = opendir($configpath)) { diff --git a/core/components/migx/processors/mgr/packagemanager/packagemanager.class.php b/core/components/migx/processors/mgr/packagemanager/packagemanager.class.php index 77b6158..0b3a92c 100644 --- a/core/components/migx/processors/mgr/packagemanager/packagemanager.class.php +++ b/core/components/migx/processors/mgr/packagemanager/packagemanager.class.php @@ -34,7 +34,7 @@ public function process() { //$this->setPlaceholder('schema', @file_get_contents($schemafile)); } - $packagepath = $this->modx->getOption('core_path') . 'components/' . $packageName . '/'; + $packagepath = $this->modx->migx->findPackagePath($packageName); $modelpath = $packagepath . 'model/'; $schemapath = $modelpath . 'schema/'; $schemafile = $schemapath . $packageName . '.mysql.schema.xml';