1
0

Fix fallback chain

Engine: default in info.txt will now lead to the template to use template/default as fallback before the default-template (2k11 currently). An approach to fix #130

Also, template_engine is not automatically set to default, as this was implicitly always the case
This commit is contained in:
onli
2014-04-27 20:23:56 +02:00
parent 4efba7e295
commit 99c1f4c87c
3 changed files with 26 additions and 31 deletions

View File

@ -71,7 +71,12 @@ if ($serendipity['GET']['adminAction'] == 'install' ) {
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');
// template_engine was set by default to default, which screws up the fallback chain (to the default-template first)
serendipity_set_config_var('template_engine', null);
if ($themeInfo['engine']) {
serendipity_set_config_var('template_engine', $themeInfo['engine']);
}
serendipity_set_config_var('last_template_change', time());
$data["adminAction"] = "install";