diff --git a/admin/template_editor.php b/admin/template_editor.php index 7890092..70e174b 100644 --- a/admin/template_editor.php +++ b/admin/template_editor.php @@ -60,14 +60,14 @@ // Save old version if (dol_is_file($pathoffile)) { - dol_copy($pathoffile, $pathoffile . '.back', 0, 1); + dol_copy($pathoffile, $pathoffile . '.back', 0, 1, 0, 1); } $content = GETPOST('editfilecontent', 'none'); // Save file on disk if ($content) { - dol_delete_file($pathoffile); + dol_delete_file($pathoffile, 0, 0, 0, null, false, 1); $result = file_put_contents($pathoffile, $content); if ($result) { dolChmod($pathoffile, $newmask); @@ -78,8 +78,7 @@ } } else { setEventMessages($langs->trans("ContentCantBeEmpty"), null, 'errors'); - //$action='editfile'; - $error++; + $action = ''; } } @@ -98,7 +97,7 @@ $linkback = ''; $linkback .= $langs->trans("BackToModuleList") . ''; -print load_fiche_titre($langs->trans('EasydocgeneratorConfig'), $linkback, 'tools'); +//print load_fiche_titre($langs->trans('EasydocgeneratorConfig'), $linkback, 'tools'); $head = easydocgeneratorAdminPrepareHead(); @@ -120,7 +119,7 @@ print dol_get_fiche_head($head, 'editor', $langs->trans('Settings'), -1, 'technic'); -$doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', ''); +$doleditor = new DolEditor('editfilecontent', $content, '', '500', 'Full', 'In', true, false, 'ace', 0, '99%', ''); print $doleditor->Create(1, '', false, $langs->trans("File") . ' : ' . $file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print dol_get_fiche_end();