This commit is contained in:
Garvin Hicking 2013-07-23 10:03:53 +02:00
parent 1ea154b028
commit e283ba69b3
3 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,9 @@
Version 1.7.1 ()
------------------------------------------------------------------------
* Added new event hooks "backend_plugins_install", "backend_plugins_update"
and "backend_templates_install".
* Serendipity will switch to mysqli if PHP >= 5.5 is used (mysql
is deprecated)

View File

@ -519,6 +519,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>';
@ -528,6 +530,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);
}
}

View File

@ -61,6 +61,9 @@ if ($serendipity['GET']['adminAction'] == 'install' ) {
$themeInfo = serendipity_fetchTemplateInfo(htmlspecialchars($serendipity['GET']['theme']));
// A separate hook is used post installation, for plugins to possibly perform some actions
serendipity_plugin_api::hook_event('backend_templates_install', $serendipity['GET']['theme'], $themeInfo);
serendipity_set_config_var('template', htmlspecialchars($serendipity['GET']['theme']));
serendipity_set_config_var('template_engine', isset($themeInfo['engine']) ? $themeInfo['engine'] : 'default');