Skip to content

Commit

Permalink
add ace editor
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Feb 8, 2024
1 parent e04638a commit 04cd748
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions admin/template_editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -78,8 +78,7 @@
}
} else {
setEventMessages($langs->trans("ContentCantBeEmpty"), null, 'errors');
//$action='editfile';
$error++;
$action = '';
}
}

Expand Down

0 comments on commit 04cd748

Please sign in to comment.