Fix create new page
This commit is contained in:
parent
acf7aa6489
commit
87e221d6dd
@ -149,18 +149,20 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage,
|
|||||||
global $conf, $db;
|
global $conf, $db;
|
||||||
|
|
||||||
// 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 (duplicate code with actions updatesource or updatecontent but we need this to save new header)
|
||||||
dol_syslog("We regenerate the tpl page filetpl=".$filetpl);
|
dol_syslog("dolSavePageContent We regenerate the tpl page filetpl=".$filetpl);
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
if ($backupold) {
|
if (dol_is_file($filetpl)) {
|
||||||
dol_delete_file($filetpl.'.old');
|
if ($backupold) {
|
||||||
$result = dol_move($filetpl, $filetpl.'.old', 0, 1, 0, 0);
|
dol_delete_file($filetpl.'.old');
|
||||||
if (! $result) {
|
$result = dol_move($filetpl, $filetpl.'.old', 0, 1, 0, 0);
|
||||||
return false;
|
if (! $result) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dol_delete_file($filetpl);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
dol_delete_file($filetpl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$shortlangcode = '';
|
$shortlangcode = '';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user