extension and upgrade scripts fix

This commit is contained in:
Yuri Kuznetsov
2020-07-12 14:27:07 +03:00
parent d346e35901
commit 269f2b4850
2 changed files with 2 additions and 6 deletions

View File

@@ -47,13 +47,11 @@ if (!isset($pathInfo['extension']) || $pathInfo['extension'] !== 'zip' || !is_fi
}
$app = new \Espo\Core\Application();
$app->setupSystemUser();
$config = $app->getContainer()->get('config');
$entityManager = $app->getContainer()->get('entityManager');
$user = $entityManager->getEntity('User', 'system');
$app->getContainer()->setUser($user);
$upgradeManager = new \Espo\Core\ExtensionManager($app->getContainer());
echo "Starting installation process...\n";

View File

@@ -52,13 +52,11 @@ if (!isset($pathInfo['extension']) || $pathInfo['extension'] !== 'zip' || !is_fi
}
$app = new \Espo\Core\Application();
$app->setupSystemUser();
$config = $app->getContainer()->get('config');
$entityManager = $app->getContainer()->get('entityManager');
$user = $entityManager->getEntity('User', 'system');
$app->getContainer()->setUser($user);
$upgradeManager = new \Espo\Core\UpgradeManager($app->getContainer());
echo "Current version is " . $config->get('version') . "\n";