Skip to content

Commit 9f0cb15

Browse files
author
Marius Burkard
committed
- fixed missing action setting on merged plugin class
1 parent 35957eb commit 9f0cb15

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

server/lib/classes/plugin_webserver_base.inc.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
class plugin_webserver_base {
3232

33+
private $action = '';
34+
3335
public function registerEvents($server_type = 'apache') {
3436
global $app;
3537

@@ -522,10 +524,12 @@ public function awstats_delete ($data, $web_config) {
522524
$app->log('Removed AWStats config file: '.$awstats_conf_dir.'/awstats.'.$data['old']['domain'].'.conf', LOGLEVEL_DEBUG);
523525
}
524526
}
525-
526-
public function eventUpdate($event_name, $data, $server_type = 'apache') {
527+
528+
public function eventUpdate($event_name, $data, $action, $server_type = 'apache') {
527529
global $app, $conf;
528530

531+
$this->action = $action;
532+
529533
if($server_type === 'nginx') {
530534
//* Check if the apache plugin is enabled
531535
if(@is_link('/usr/local/ispconfig/server/plugins-enabled/apache2_plugin.inc.php')) {

server/plugins-available/apache2_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function update($event_name, $data) {
9898

9999
if($this->action != 'insert') $this->action = 'update';
100100

101-
$app->plugin_webserver_base->eventUpdate($event_name, $data, 'apache');
101+
$app->plugin_webserver_base->eventUpdate($event_name, $data, $this->action, 'apache');
102102

103103
//* Unset action to clean it for next processed vhost.
104104
$this->action = '';

0 commit comments

Comments
 (0)