fixed template copy

This commit is contained in:
Roland Gruber 2017-01-11 21:27:28 +01:00
parent f1fb0bf355
commit 89cfba1a24
2 changed files with 4 additions and 2 deletions

View File

@ -354,7 +354,8 @@ function installPDFTemplates() {
foreach ($allTemplates[$type->getScope()] as $templateName) {
$path = $basePath . $templateName . '.' . $type->getId() . '.xml';
if (!is_file($path)) {
$template = $templatePath . '/' . $templateName . '.' . $scope . '.xml';
$template = $templatePath . '/' . $templateName . '.' . $type->getScope() . '.xml';
logNewMessage(LOG_DEBUG, 'Copy template ' . $template . ' to ' . $path);
@copy($template, $path);
}
}

View File

@ -260,7 +260,8 @@ function installProfileTemplates() {
foreach ($allTemplates[$type->getScope()] as $templateName) {
$path = $basePath . $templateName . '.' . $type->getId();
if (!is_file($path)) {
$template = $templatePath . '/' . $templateName . '.' . $scope;
$template = $templatePath . '/' . $templateName . '.' . $type->getScope();
logNewMessage(LOG_DEBUG, 'Copy template ' . $template . ' to ' . $path);
@copy($template, $path);
}
}