backport
This commit is contained in:
parent
1ea154b028
commit
e283ba69b3
@ -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)
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user