From 8ef88915818fdf5ef889a68f339ffe7ebd983d07 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Wed, 18 Jun 2025 14:24:51 +0200 Subject: [PATCH] Debug v22 --- htdocs/website/class/website.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index f008fc510dc..9751b464045 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -197,6 +197,8 @@ class Website extends CommonObject return -1; } + $pathofwebsite = $conf->website->dir_output.'/'.$this->ref; + // Insert request $sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element.'('; $sql .= 'entity,'; @@ -254,8 +256,6 @@ class Website extends CommonObject dol_mkdir($conf->medias->multidir_output[$conf->entity].'/image/'.$this->ref, DOL_DATA_ROOT); dol_mkdir($conf->medias->multidir_output[$conf->entity].'/js/'.$this->ref, DOL_DATA_ROOT); - $pathofwebsite = $conf->website->dir_output.'/'.$this->ref; - // Check symlink documents/website/mywebsite/medias to point to documents/medias and restore it if ko. // Recreate also dir of website if not found. $pathtomedias = DOL_DATA_ROOT.'/medias'; @@ -284,12 +284,12 @@ class Website extends CommonObject $stringtodolibarrfile .= "param=value\n"; //print $conf->website->dir_output.'/'.$this->ref.'/.dolibarr';exit; file_put_contents($pathofwebsite.'/.dolibarr', $stringtodolibarrfile); - } - $filelicense = $pathofwebsite.'/LICENSE'; - if (!dol_is_file($filelicense)) { - $licensecontent = "LICENSE\n-------\nThis website template content (HTML and PHP code) is published under the license CC-BY-SA - https://creativecommons.org/licenses/by/4.0/"; - $result = dolSaveLicense($filelicense, $licensecontent); + $filelicense = $pathofwebsite.'/LICENSE'; + if (!dol_is_file($filelicense)) { + $licensecontent = "LICENSE\n-------\nThis website template content (HTML and PHP code) is published under the license CC-BY-SA - https://creativecommons.org/licenses/by/4.0/"; + $result = dolSaveLicense($filelicense, $licensecontent); + } } // Commit or rollback