Skip to content
Snippets Groups Projects
Commit 9f5fbe78 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Bad fix

parent 5dc6f6ae
No related branches found
No related tags found
No related merge requests found
...@@ -364,6 +364,7 @@ if (! $error && $db->connected && $action == "set") ...@@ -364,6 +364,7 @@ if (! $error && $db->connected && $action == "set")
} }
} }
} }
if ($error) if ($error)
{ {
print "<tr><td>".$langs->trans("ErrorDirDoesNotExists",$main_data_dir); print "<tr><td>".$langs->trans("ErrorDirDoesNotExists",$main_data_dir);
...@@ -377,14 +378,14 @@ if (! $error && $db->connected && $action == "set") ...@@ -377,14 +378,14 @@ if (! $error && $db->connected && $action == "set")
{ {
//ODT templates //ODT templates
require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'); require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
$srcroot='./doctemplates'; $srcroot=$main_dir.'/install/doctemplates';
$destroot=$main_data_dir.'/doctemplates'; $destroot=$main_data_dir.'/doctemplates';
$docs=array('thirdparties' => 'thirdparty', 'proposals' => 'proposal', 'orders' => 'order', 'invoices' => 'invoice'); $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'; $src=$srcroot.'/'.$cursordir.'/template_'.$cursorfile.'.odt';
$dirodt=$destroot.'/'.$dir; $dirodt=$destroot.'/'.$cursordir;
$dest=$dirodt.'/template_'.$file.'.odt'; $dest=$dirodt.'/template_'.$cursorfile.'.odt';
dol_mkdir($dirodt); dol_mkdir($dirodt);
$result=dol_copy($src,$dest,0,0); $result=dol_copy($src,$dest,0,0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment