Skip to content

EspoCRM – Open Source CRM Application

Ref

Yuriie90632046031
diff --git a/application/Espo/Controllers/EntityManager.php b/application/Espo/Controllers/EntityManager.php
index 38a20b28f8..9cd5e3c522 100644
--- a/application/Espo/Controllers/EntityManager.php
+++ b/application/Espo/Controllers/EntityManager.php
@@ -571,10 +571,10 @@ class EntityManager
$export = $this->injectableFactory->create(ExportCustom::class);
$service = $this->injectableFactory->create(ExportCustomService::class);
- $service->storeToConfig($params);
-
$result = $export->process($params);
+ $service->storeToConfig($params);
+
return (object) ['id' => $result->getAttachmentId()];
}
}
diff --git a/application/Espo/Tools/ExportCustom/Data.php b/application/Espo/Tools/ExportCustom/Data.php
index f2a28ca613..cab2d18242 100644
--- a/application/Espo/Tools/ExportCustom/Data.php
+++ b/application/Espo/Tools/ExportCustom/Data.php
@@ -47,6 +47,6 @@ class Data
public function getDestDir(): string
{
- return $this->getDir() . '/files/custom/Espo/Modules/' . $this->module;
+ return $this->getDir() . '/files/custom/Espo/Modules/' . basename($this->module);
}
}
diff --git a/application/Espo/Tools/ExportCustom/ExportCustom.php b/application/Espo/Tools/ExportCustom/ExportCustom.php
index d3631e7e91..675a610aa5 100644
--- a/application/Espo/Tools/ExportCustom/ExportCustom.php
+++ b/application/Espo/Tools/ExportCustom/ExportCustom.php
@@ -40,7 +40,6 @@ use Espo\Core\Utils\Util;
use Espo\Entities\Attachment;
use Espo\ORM\EntityManager;
use Espo\Tools\EntityManager\NameUtil;
-
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use RuntimeException;
@@ -48,7 +47,7 @@ use ZipArchive;
class ExportCustom
{
- private string $minVersion = '9.1.0';
+ private string $minVersion = '9.3.0';
/** @var string[] */
private array $metadataFolderList = [
@@ -68,7 +67,7 @@ class ExportCustom
private FileManager $fileManager,
private NameUtil $nameUtil,
private FileStorageManager $fileStorageManager,
- private EntityManager $entityManager
+ private EntityManager $entityManager,
) {}
public function process(Params $params): Result
@@ -103,13 +102,10 @@ class ExportCustom
private function copy(Data $data): void
{
- $customDir = 'custom/Espo/Custom';
+ $source = 'custom/Espo/Custom/Resources';
+ $dest = $data->getDestDir() . '/Resources';
- $this->fileManager->copy(
- $customDir . '/Resources',
- $data->getDestDir() . '/Resources',
- true
- );
+ $this->fileManager->copy($source, $dest, true);
}
private function fixMetadata(Params $params, Data $data): void
@@ -348,6 +344,9 @@ class ExportCustom
'Google',
'Outlook',
'Voip',
+ 'Intelligence',
+ 'ProjectManagement',
+ 'MeetingScheduler',
];
if (in_array($params->getModule(), $forbiddenModuleNames)) {
diff --git a/application/Espo/Tools/LabelManager/LabelManager.php b/application/Espo/Tools/LabelManager/LabelManager.php
index 0535c6cfc2..a9756b3606 100644
--- a/application/Espo/Tools/LabelManager/LabelManager.php
+++ b/application/Espo/Tools/LabelManager/LabelManager.php
@@ -324,8 +324,6 @@ class LabelManager implements
}
}
- //die;
-
$languageObj->saveScopeCustom($scope, $customData);
return $this->getScopeData($language, $scope);