Fix import

This commit is contained in:
Laurent Destailleur 2018-09-10 22:58:20 +02:00
parent 280f15e8bf
commit 9e982e05df
2 changed files with 5 additions and 14 deletions

View File

@ -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

View File

@ -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 = '<?php'."\n";
$mastercontent.= '// File generated to link to the master file - DO NOT MODIFY - It is just an include'."\n";
$mastercontent.= "if (! defined('USEDOLIBARRSERVER')) require_once '".DOL_DOCUMENT_ROOT."/master.inc.php';\n";
//$mastercontent.= "include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php';"."\n";
//$mastercontent.= '$website = new WebSite($db)'."\n";
$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))