From a5edd530d21ea9068dbad765d55c6baa06cc3bdf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 8 Sep 2018 14:10:07 +0200 Subject: [PATCH] Fix delete of website --- htdocs/website/class/website.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 3bb8adbd058..13a453cebbe 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -484,6 +484,14 @@ class Website extends CommonObject } } + if (! $error && ! empty($this->ref)) + { + global $dolibarr_main_data_root; + $pathofwebsite=$dolibarr_main_data_root.'/website/'.$this->ref; + + dol_delete_dir_recursive($pathofwebsite); + } + // Commit or rollback if ($error) { $this->db->rollback();