From ab7597c7ec2d62aadf82c4c647d3dc63dae8de90 Mon Sep 17 00:00:00 2001 From: mcramer <m.cramer@pixcept.de> Date: Thu, 16 Aug 2012 14:53:05 -0400 Subject: [PATCH] Implemented FS#2379 - Add perl option to web sites (apache2 mod_perl2) Fixed (partly) FS#2310 - Template switch not working in mailuser module, for dashlets and the login page --- server/plugins-available/aps_plugin.inc.php | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/aps_plugin.inc.php b/server/plugins-available/aps_plugin.inc.php index 26ae9be..badbc0e 100644 --- a/server/plugins-available/aps_plugin.inc.php +++ b/server/plugins-available/aps_plugin.inc.php @@ -28,7 +28,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -require_once(ISPC_ROOT_PATH.'/lib/classes/aps_installer.inc.php'); +if(defined(ISPC_ROOT_PATH)) include_once(ISPC_ROOT_PATH.'/lib/classes/aps_installer.inc.php'); //require_once(ISPC_ROOT_PATH.'/lib/classes/class.installer.php'); class aps_plugin @@ -57,7 +57,7 @@ global $app; // Register the available events - $app->plugins->registerEvent('aps_instance_install', $this->plugin_name, 'install'); + $app->plugins->registerEvent('aps_instance_insert', $this->plugin_name, 'install'); $app->plugins->registerEvent('aps_instance_update', $this->plugin_name, 'install'); $app->plugins->registerEvent('aps_instance_delete', $this->plugin_name, 'delete'); } @@ -78,6 +78,12 @@ $app->log("Running installHandler",LOGLEVEL_DEBUG); $aps->installHandler($instanceid, 'install'); } + + if($data['new']['instance_status'] == INSTANCE_REMOVE) { + $aps = new ApsInstaller($app); + $app->log("Running installHandler",LOGLEVEL_DEBUG); + $aps->installHandler($instanceid, 'delete'); + } } /** -- Gitblit v1.9.1