From a2641b89e7eb97e1ffac4d10ee3379bc93deb625 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 3 Aug 2012 18:43:30 +0200 Subject: [PATCH] Fix: Bad fix --- htdocs/install/etape1.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index b835d0dbde7..e8fc6fd4aaf 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -362,6 +362,7 @@ if (! $error && $db->connected && $action == "set") } } } + if ($error) { print "".$langs->trans("ErrorDirDoesNotExists",$main_data_dir); @@ -375,14 +376,14 @@ if (! $error && $db->connected && $action == "set") { //ODT templates require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'); - $srcroot='./doctemplates'; + $srcroot=$main_dir.'/install/doctemplates'; $destroot=$main_data_dir.'/doctemplates'; $docs=array('thirdparties' => 'thirdparty', 'proposals' => 'proposal', 'orders' => 'order', 'invoices' => 'invoice'); - foreach($docs as $dir => $file) + foreach($docs as $cursordir => $cursorfile) { - $src=$srcroot.'/thirdparties/template_'.$file.'.odt'; - $dirodt=$destroot.'/'.$dir; - $dest=$dirodt.'/template_'.$file.'.odt'; + $src=$srcroot.'/'.$cursordir.'/template_'.$cursorfile.'.odt'; + $dirodt=$destroot.'/'.$cursordir; + $dest=$dirodt.'/template_'.$cursorfile.'.odt'; dol_mkdir($dirodt); $result=dol_copy($src,$dest,0,0);