diff --git a/lam/lib/pdfstruct.inc b/lam/lib/pdfstruct.inc index 580f92c2..7a28c1b9 100644 --- a/lam/lib/pdfstruct.inc +++ b/lam/lib/pdfstruct.inc @@ -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); } } diff --git a/lam/lib/profiles.inc b/lam/lib/profiles.inc index 9743324c..9db4065b 100644 --- a/lam/lib/profiles.inc +++ b/lam/lib/profiles.inc @@ -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); } }