1
0

Added new event hooks for plugin and template installation/update

This commit is contained in:
Garvin Hicking
2013-07-23 09:46:44 +02:00
parent e72aa19280
commit c5708f746c
3 changed files with 10 additions and 0 deletions

View File

@@ -354,6 +354,8 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
$bag = new serendipity_property_bag;
$plugin->introspect($bag);
serendipity_plugin_api::hook_event('backend_plugins_install', $serendipity['GET']['install_plugin'], $fetchplugin_data);
if ($bag->is_set('configuration')) {
/* Only play with the plugin if there is something to play with */
echo '<script type="text/javascript">location.href = \'' . $serendipity['baseurl'] . '?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . $inst . '\';</script>';
@@ -363,6 +365,8 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
echo '<script type="text/javascript">location.href = \'' . $serendipity['baseurl'] . '?serendipity[adminModule]=plugins\';</script>';
die();
}
} else {
serendipity_plugin_api::hook_event('backend_plugins_update', $serendipity['GET']['install_plugin'], $fetchplugin_data);
}
}