]> git.mjollnir.org Git - s9y.git/commitdiff
backport fix
authorgarvinhicking <garvinhicking>
Wed, 18 May 2005 14:58:08 +0000 (14:58 +0000)
committergarvinhicking <garvinhicking>
Wed, 18 May 2005 14:58:08 +0000 (14:58 +0000)
docs/NEWS
include/functions_entries.inc.php

index 7ab2abd0d1e57bbe9885755769b7df6c9087ac4a..873849162fd5a9022716b5a384e22945ca857e10 100644 (file)
--- 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)
 ------------------------------------------------------------------------
index 5c9f1332e5cb49d1e79a81f82661f463e96dbe60..5ac36e5c31ef425f61fb595fb51171bb0ca8c57c 100644 (file)
@@ -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');