Fix home page after first page creation
This commit is contained in:
parent
99b1c773a7
commit
b81c02de04
@ -841,6 +841,13 @@ if ($action == 'addcontainer')
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
$filetpl = $pathofwebsite.'/page'.$pageid.'.tpl.php';
|
||||
|
||||
// Generate the index.php page to be the home page
|
||||
$result = dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper);
|
||||
|
||||
if ($result <= 0) setEventMessages('Failed to write file '.$fileindex, null, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1312,8 +1319,9 @@ if ($action == 'setashome')
|
||||
{
|
||||
$db->commit();
|
||||
|
||||
$filetpl = $pathofwebsite.'/page'.$pageid.'.tpl.php';
|
||||
|
||||
// Generate the index.php page to be the home page
|
||||
//-------------------------------------------------
|
||||
$result = dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper);
|
||||
|
||||
if ($result) setEventMessages($langs->trans("Saved"), null, 'mesgs');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user