1
0

Fix not initializing smarty framework in the preview iframe, which lead to templates

config.inc.php files not being loaded (to hook into a config.inc.php)
This commit is contained in:
Garvin Hicking
2015-03-13 15:37:10 +01:00
parent 8f88998c90
commit 88a4776891
2 changed files with 7 additions and 0 deletions

View File

@@ -39,6 +39,9 @@ Version 2.1 ()
Version 2.0.2 ()
------------------------------------------------------------------------
* Fix initializing smarty framework in the preview/saving iframe,
so that a template's config.inc.php is always loaded.
* Show debugging .tpl file information with relative directory only
* fix wrong upgrade removal of dead files with 2.0.1 update

View File

@@ -778,6 +778,10 @@ function serendipity_is_iframe() {
global $serendipity;
if ($serendipity['GET']['is_iframe'] && is_array($_SESSION['save_entry'])) {
if (!is_object($serendipity['smarty'])) {
// We need smarty also in the iframe to load a template's config.inc.php and register possible event hooks.
serendipity_smarty_init();
}
return true;
}
return false;