From e570d9c2e3b80c22eceb72afd4baa557b93e9017 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Tue, 13 Nov 2018 16:36:21 +0100 Subject: [PATCH] - added missing chattr removal on delete --- server/lib/classes/plugin_webserver_base.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/lib/classes/plugin_webserver_base.inc.php b/server/lib/classes/plugin_webserver_base.inc.php index bbe9f6718f..e52c16e91f 100644 --- a/server/lib/classes/plugin_webserver_base.inc.php +++ b/server/lib/classes/plugin_webserver_base.inc.php @@ -1619,7 +1619,7 @@ class plugin_webserver_base { $this->action = ''; } - public function eventDelete($event_name, $data, $server_type = 'apache') { + public function eventDelete($event_name, $data, $server_type = 'apache') { global $app, $conf; // load the server configuration options @@ -1628,7 +1628,10 @@ class plugin_webserver_base { $web_config = $app->getconf->get_server_config($conf['server_id'], 'web'); $fastcgi_config = $app->getconf->get_server_config($conf['server_id'], 'fastcgi'); - if($data['old']['type'] == 'vhost' || $data['old']['type'] == 'vhostsubdomain' || $data['old']['type'] == 'vhostalias') { + if($data['old']['type'] == 'vhost') { + $app->system->web_folder_protection($data['old']['document_root'], false); + } elseif($data['old']['type'] == 'vhostsubdomain' || $data['old']['type'] == 'vhostalias') { + $parent_domain_id = intval($data['old']['parent_domain_id']); $tmp = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ? AND active = 'y'", $parent_domain_id); $app->system->web_folder_protection($tmp['document_root'], false); -- GitLab