This commit is contained in:
Paula V. Quispe
2016-03-28 14:37:09 -04:00
parent 601f3e2370
commit 940b4cf7ea

View File

@@ -31,18 +31,18 @@ class TemplatesMigrator implements Importable, Exportable
try {
$aTable = $data['TABLE'];
foreach ($aTable as $value) {
if ($value['PRF_EDITABLE'] === 1) {
if ($value['PRF_EDITABLE'] === '1') {
if ($replace) {
$this->processes->createFilesManager($value['PRO_UID'], array($value));
} else {
$this->processes->updateFilesManager($value['PRO_UID'], array($value));
$this->processes->addNewFilesManager($value['PRO_UID'], array($value));
}
}
}
$aPath = $data['PATH'];
foreach ($aPath as $target => $files) {
$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) {
$filename = $basePath . ((isset($file["file_path"])) ? $file["file_path"] : $file["filepath"]);
$path = dirname($filename);