diff --git a/include/functions_comments.inc.php b/include/functions_comments.inc.php index 7eef369a..7120e762 100644 --- a/include/functions_comments.inc.php +++ b/include/functions_comments.inc.php @@ -960,7 +960,7 @@ function serendipity_saveComment($id, $commentInfo, $type = 'NORMAL', $source = fclose($fp); } - serendipity_insertComment($id, $commentInfo, $type, $source, $ca); + $commentInfo['comment_cid'] = serendipity_insertComment($id, $commentInfo, $type, $source, $ca); $commentInfo['comment_id'] = $id; serendipity_plugin_api::hook_event('frontend_saveComment_finish', $ca, $commentInfo); return true; diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index 62a9b854..21d5cd90 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -1017,9 +1017,13 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm $dategroup =& $entries; } - foreach($dategroup as $properties) { + foreach($dategroup as $dategroup_idx => $properties) { foreach($properties['entries'] as $x => $_entry) { - $entry = &$properties['entries'][$x]; // PHP4 Compat + if ($smarty_fetch === 'return') { + $entry = &$dategroup[$dategroup_idx]['entries'][$x]; // PHP4 Compat + } else { + $entry = &$properties['entries'][$x]; // PHP4 Compat + } if (!empty($entry['properties']['ep_cache_body'])) { $entry['body'] = &$entry['properties']['ep_cache_body'];