From 9f0cb153d58e9923173237063159281d364a8180 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Tue, 13 Nov 2018 16:33:11 +0100 Subject: [PATCH] - fixed missing action setting on merged plugin class --- server/lib/classes/plugin_webserver_base.inc.php | 8 ++++++-- server/plugins-available/apache2_plugin.inc.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/server/lib/classes/plugin_webserver_base.inc.php b/server/lib/classes/plugin_webserver_base.inc.php index 8f18db7491..bbe9f6718f 100644 --- a/server/lib/classes/plugin_webserver_base.inc.php +++ b/server/lib/classes/plugin_webserver_base.inc.php @@ -30,6 +30,8 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. class plugin_webserver_base { + private $action = ''; + public function registerEvents($server_type = 'apache') { global $app; @@ -522,10 +524,12 @@ class plugin_webserver_base { $app->log('Removed AWStats config file: '.$awstats_conf_dir.'/awstats.'.$data['old']['domain'].'.conf', LOGLEVEL_DEBUG); } } - - public function eventUpdate($event_name, $data, $server_type = 'apache') { + + public function eventUpdate($event_name, $data, $action, $server_type = 'apache') { global $app, $conf; + $this->action = $action; + if($server_type === 'nginx') { //* Check if the apache plugin is enabled if(@is_link('/usr/local/ispconfig/server/plugins-enabled/apache2_plugin.inc.php')) { diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 2af63d2703..ccb7a81e01 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -98,7 +98,7 @@ class apache2_plugin { if($this->action != 'insert') $this->action = 'update'; - $app->plugin_webserver_base->eventUpdate($event_name, $data, 'apache'); + $app->plugin_webserver_base->eventUpdate($event_name, $data, $this->action, 'apache'); //* Unset action to clean it for next processed vhost. $this->action = ''; -- GitLab