Skip to content

Commit

Permalink
more GPM path fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno17 committed Apr 25, 2022
1 parent 1d5a036 commit b14c5ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand All @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit b14c5ab

Please sign in to comment.