From 39fc2e6e6025ec100511f0e5b912047a6f6b9638 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Apr 2021 19:48:15 +0200 Subject: [PATCH] NEW Save old page with .old in edition of a website page --- htdocs/core/lib/website2.lib.php | 16 +++++++++++++--- htdocs/website/index.php | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index e9a5aa6309f..e66ef50b161 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -66,7 +66,7 @@ function dolSavePageAlias($filealias, $object, $objectpage) { global $conf; - // Now create the .tpl file (duplicate code with actions updatesource or updatecontent but we need this to save new header) + // Now create the .tpl file dol_syslog("dolSavePageAlias We regenerate the alias page filealias=".$filealias); $aliascontent = 'lang) { diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 021edc52920..3e4c56cd240 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1996,7 +1996,7 @@ if ($usercanedit && (($action == 'updatesource' || $action == 'updatecontent' || } // Save page content - $result = dolSavePageContent($filetpl, $object, $objectpage); + $result = dolSavePageContent($filetpl, $object, $objectpage, 1); if ($result) { setEventMessages($langs->trans("Saved"), null, 'mesgs');