From 4eb3dfffcc27fabf994193c90e41a62b96493af8 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Wed, 18 May 2005 14:58:08 +0000 Subject: [PATCH] backport fix --- docs/NEWS | 5 ++--- include/functions_entries.inc.php | 5 +++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 7ab2abd..8738491 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,9 +3,8 @@ Version 0.8.2 () ------------------------------------------------------------------------ - * when no DB updates and no function calls are needed, do not show - confusing text to the user telling him an upgrade has - failed. (garvinhicking) + * Fix missing authorname when previewing entry. Thanks to winkiller, + aquatic, thomas, wurstprinz and hansi for fixing this! Version 0.8.1 (May 17th, 2005) ------------------------------------------------------------------------ diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index 5c9f133..5ac36e5 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -583,6 +583,11 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false) { foreach($dategroup as $properties) { foreach($properties['entries'] as $x => $_entry) { $entry = &$properties['entries'][$x]; // PHP4 Compat + if ($preview) { + $entry['author'] = $entry['realname']; + $entry['authorid'] = $serendipity['authorid']; + } + serendipity_plugin_api::hook_event('frontend_display', $entry); $entry['link'] = serendipity_archiveURL($entry['id'], $entry['title'], 'serendipityHTTPPath'); -- 2.39.5