diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index e7bdf664..8ef0ced1 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -1281,7 +1281,7 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm if (isset($serendipity['short_archives']) && $serendipity['short_archives']) { return serendipity_smarty_fetch($smarty_block, 'entries_summary.tpl', true); } elseif ($smarty_fetch == true) { - return serendipity_smarty_fetch($smarty_block, 'entries.tpl', true); + return serendipity_smarty_fetch($smarty_block, 'entries.tpl', true, $preview); } } // end function serendipity_printEntries diff --git a/include/functions_smarty.inc.php b/include/functions_smarty.inc.php index aea22190..89909fac 100644 --- a/include/functions_smarty.inc.php +++ b/include/functions_smarty.inc.php @@ -74,10 +74,10 @@ function serendipity_smarty_html5time($timestamp) { * @param boolean If true, the output of the smarty parser will be echoed instead of invisibly treated * @return string The parsed HTML code */ -function &serendipity_smarty_fetch($block, $file, $echo = false) { +function &serendipity_smarty_fetch($block, $file, $echo = false, $preview = false) { global $serendipity; - $output = $serendipity['smarty']->fetch('file:'. serendipity_getTemplateFile($file, 'serendipityPath'), null, null, null, ($echo === true && $serendipity['smarty_raw_mode'])); + $output = $serendipity['smarty']->fetch('file:'. serendipity_getTemplateFile($file, 'serendipityPath', $preview), null, null, null, ($echo === true && $serendipity['smarty_raw_mode'])); $serendipity['smarty']->assignByRef($block, $output);