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:
@@ -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
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user