From 89cfba1a24b182bafc0208f3b043f2ef1bfbcf1d Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Wed, 11 Jan 2017 21:27:28 +0100 Subject: [PATCH] fixed template copy --- lam/lib/pdfstruct.inc | 3 ++- lam/lib/profiles.inc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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); } }