diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index a740cb7e..b2ebd086 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -499,7 +499,6 @@ function &serendipity_fetchEntries($range = null, $full = true, $limit = '', $fe serendipity_cacheItem($key, serialize($ret)); serendipity_cacheItem($key . '_fullCountQuery', $serendipity['fullCountQuery']); } - return $ret; } @@ -1237,6 +1236,8 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm if (isset($entry['exflag']) && $entry['exflag'] && ($extended || $preview)) { $entry['is_extended'] = true; + } else { + $entry['is_extended'] = false; } if (serendipity_db_bool($entry['allow_comments']) || !isset($entry['allow_comments']) || $entry['comments'] > 0) { @@ -1262,6 +1263,8 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm serendipity_plugin_api::hook_event('backend_preview', $entry); $entry['backend_preview'] = ob_get_contents(); ob_end_clean(); + } else { + $entry['backend_preview'] = null; } /* IF WE ARE DISPLAYING A FULL ENTRY */ diff --git a/include/functions_smarty.inc.php b/include/functions_smarty.inc.php index b9d6ba9d..a93693ef 100644 --- a/include/functions_smarty.inc.php +++ b/include/functions_smarty.inc.php @@ -1072,7 +1072,7 @@ function serendipity_smarty_init($vars = array()) { 'head_subtitle' => $serendipity['head_subtitle'] ?? null, 'head_link_stylesheet' => $serendipity['smarty_vars']['head_link_stylesheet'], 'head_link_script' => $serendipity['smarty_vars']['head_link_script'], - 'head_link_stylesheet_frontend' => $serendipity['smarty_vars']['head_link_stylesheet_frontend'], + 'head_link_stylesheet_frontend' => $serendipity['smarty_vars']['head_link_stylesheet_frontend'] ?? null, 'is_xhtml' => true, 'use_popups' => $serendipity['enablePopup'] ?? null,