diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index ffdd091ea71..68cf5e8c293 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -971,6 +971,10 @@ class Website extends CommonObject dolCopyDir($conf->website->dir_temp.'/'.$object->ref.'/containers', $conf->website->dir_output.'/'.$object->ref, 0, 1); // Overwrite if exists + // Now generate the master.inc.php page + $filemaster=$conf->website->dir_output.'/'.$object->ref.'/master.inc.php'; + dolSaveMasterFile($filemaster); + dolCopyDir($conf->website->dir_temp.'/'.$object->ref.'/medias/image/websitekey', $conf->website->dir_output.'/'.$object->ref.'/medias/image/'.$object->ref, 0, 1); // Medias can be shared, do not overwrite if exists dolCopyDir($conf->website->dir_temp.'/'.$object->ref.'/medias/js/websitekey', $conf->website->dir_output.'/'.$object->ref.'/medias/js/'.$object->ref, 0, 1); // Medias can be shared, do not overwrite if exists diff --git a/htdocs/website/index.php b/htdocs/website/index.php index e42a54e4904..6641620ba84 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1134,20 +1134,7 @@ if ($action == 'updatemeta') // Now generate the master.inc.php page - dol_syslog("We regenerate the master file (because we update meta)"); - dol_delete_file($filemaster); - - $mastercontent = ''."\n"; - $result = file_put_contents($filemaster, $mastercontent); - if (! empty($conf->global->MAIN_UMASK)) - @chmod($filemaster, octdec($conf->global->MAIN_UMASK)); - - if (! $result) setEventMessages('Failed to write file '.$filemaster, null, 'errors'); + dolSaveMasterFile($filemaster); // Now delete the alias.php page if (! empty($fileoldalias))