Skip to content
Permalink
Browse files

Fix: Entry preview using backend entries.tpl

  • Loading branch information
onli committed Sep 9, 2016
1 parent 58ed1f8 commit acef784f41173b684ac180d1cbf16731b5948d7d
Showing with 3 additions and 3 deletions.
  1. +1 −1 include/functions_entries.inc.php
  2. +2 −2 include/functions_smarty.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
@@ -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);

0 comments on commit acef784

Please sign in to comment.
You can’t perform that action at this time.