NEW Add a way to enter LICENSE file content in property of website

This commit is contained in:
Laurent Destailleur 2022-09-03 19:05:25 +02:00
parent 6406fbdc7e
commit 6b38b89c3b

View File

@ -979,8 +979,13 @@ class Website extends CommonObject
dol_syslog("Copy pages from ".$srcdir." into ".$destdir);
dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename, 2, array('old', 'back'));
// Copy file README.md from containers to root
dol_copy($conf->website->dir_temp.'/'.$website->ref.'/containers/README.md', $conf->website->dir_temp.'/'.$website->ref.'/README.md');
// Copy file README.md and LICENSE from directory containers into directory root
if (dol_is_file($conf->website->dir_temp.'/'.$website->ref.'/containers/README.md')) {
dol_copy($conf->website->dir_temp.'/'.$website->ref.'/containers/README.md', $conf->website->dir_temp.'/'.$website->ref.'/README.md');
}
if (dol_is_file($conf->website->dir_temp.'/'.$website->ref.'/containers/LICENSE')) {
dol_copy($conf->website->dir_temp.'/'.$website->ref.'/containers/LICENSE', $conf->website->dir_temp.'/'.$website->ref.'/LICENSE');
}
// Copy files into medias/image
$srcdir = DOL_DATA_ROOT.'/medias/image/'.$website->ref;