MT-32
This commit is contained in:
@@ -31,18 +31,18 @@ class TemplatesMigrator implements Importable, Exportable
|
|||||||
try {
|
try {
|
||||||
$aTable = $data['TABLE'];
|
$aTable = $data['TABLE'];
|
||||||
foreach ($aTable as $value) {
|
foreach ($aTable as $value) {
|
||||||
if ($value['PRF_EDITABLE'] === 1) {
|
if ($value['PRF_EDITABLE'] === '1') {
|
||||||
if ($replace) {
|
if ($replace) {
|
||||||
$this->processes->createFilesManager($value['PRO_UID'], array($value));
|
$this->processes->createFilesManager($value['PRO_UID'], array($value));
|
||||||
} else {
|
} else {
|
||||||
$this->processes->updateFilesManager($value['PRO_UID'], array($value));
|
$this->processes->addNewFilesManager($value['PRO_UID'], array($value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$aPath = $data['PATH'];
|
$aPath = $data['PATH'];
|
||||||
foreach ($aPath as $target => $files) {
|
foreach ($aPath as $target => $files) {
|
||||||
$basePath = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'mailTemplates' . PATH_SEP;
|
$basePath = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'mailTemplates' . PATH_SEP;
|
||||||
if (strtoupper($target) === 'TEMPLATES') {
|
if (strtoupper($target) === 'TEMPLATE') {
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
$filename = $basePath . ((isset($file["file_path"])) ? $file["file_path"] : $file["filepath"]);
|
$filename = $basePath . ((isset($file["file_path"])) ? $file["file_path"] : $file["filepath"]);
|
||||||
$path = dirname($filename);
|
$path = dirname($filename);
|
||||||
|
|||||||
Reference in New Issue
Block a user