mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 22:57:14 +02:00
Issue #936: Event triggering after plugin install/uninstall/upgrade/refresh
This commit is contained in:
@@ -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.
|
// Placeholder.
|
||||||
@@ -2519,6 +2543,10 @@ class e107plugin
|
|||||||
$text .= "<br /><a class='btn btn-primary' href='".e_PLUGIN.$eplug_folder."/".$eplug_conffile."'>".LAN_CONFIGURE."</a>";
|
$text .= "<br /><a class='btn btn-primary' href='".e_PLUGIN.$eplug_folder."/".$eplug_conffile."'>".LAN_CONFIGURE."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Event triggering after plugin installation.
|
||||||
|
$event = e107::getEvent();
|
||||||
|
$event->trigger('admin_plugin_install', $plug);
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user