From d48d0f740005ea3183752fd3fb40c9fc701b318a Mon Sep 17 00:00:00 2001 From: lonalore Date: Mon, 23 Mar 2015 11:15:13 +0100 Subject: [PATCH] Issue #936: Event triggering after plugin install/uninstall/upgrade/refresh --- e107_handlers/plugin_class.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index 56fd5493a..468c8d823 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -1632,6 +1632,30 @@ class e107plugin } + if ($function == 'install') + { + $event = e107::getEvent(); + $event->trigger('admin_plugin_install', $plug); + } + + if ($function == 'uninstall') + { + $event = e107::getEvent(); + $event->trigger('admin_plugin_uninstall', $plug); + } + + if ($function == 'upgrade') + { + $event = e107::getEvent(); + $event->trigger('admin_plugin_upgrade', $plug); + } + + if ($function == 'refresh') + { + $event = e107::getEvent(); + $event->trigger('admin_plugin_refresh', $plug); + } + } // Placeholder. @@ -2519,6 +2543,10 @@ class e107plugin $text .= "
".LAN_CONFIGURE.""; } + // Event triggering after plugin installation. + $event = e107::getEvent(); + $event->trigger('admin_plugin_install', $plug); + return $text; }