]> git.mjollnir.org Git - s9y.git/commitdiff
Fix entry preview data
authorgarvinhicking <garvinhicking>
Fri, 30 Sep 2005 11:00:19 +0000 (11:00 +0000)
committergarvinhicking <garvinhicking>
Fri, 30 Sep 2005 11:00:19 +0000 (11:00 +0000)
docs/NEWS
include/admin/entries.inc.php
serendipity_config.inc.php

index 063fb280c9919eb063e7ab4b760f4527f5379ab4..ec40222f5bc0d8bfa32f3815910706e6fb2d2df1 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -1,6 +1,13 @@
 # $Id$
 
-Version 0.9 ()
+Version 0.9-beta2 ()
+------------------------------------------------------------------------
+
+    * Fix using the "realname" of the author in entry preview instead of
+      username. Also fix printing category info when no category was
+      assigned. Thanks to Manuel Charisius! (garvinhicking)
+
+Version 0.9-beta1 (September 29th, 2005)
 ------------------------------------------------------------------------
 
     * Change Onyx RSS parser and xml_parser_* functions to already specify
index 56e5efabbfcbc63a154c98c5825f2681d976cca3..ec5dce8ac27aed1149ba5e8c9dfe5ec3864d6d62 100644 (file)
@@ -337,15 +337,26 @@ switch($serendipity['GET']['adminAction']) {
             }
 
             if (!isset($entry['realname']) || !$entry['realname']) {
-                $entry['realname']   = $serendipity['serendipityUser'];
+                if (!empty($serendipity['realname'])) {
+                    $entry['realname']   = $serendipity['realname'];
+                } else {
+                    $entry['realname']   = $serendipity['serendipityUser'];
+                }
             }
 
             $categories = (array)$entry['categories'];
             $entry['categories'] = array();
             foreach ($categories as $catid) {
+                if ($catid == 0) {
+                    continue;
+                }
                 $entry['categories'][] = serendipity_fetchCategoryInfo($catid);
             }
 
+            if (count($entry['categories']) < 1) {
+                unset($entry['categories']);
+            }
+
             if (isset($entry['id'])) {
                 $serendipity['GET']['id'] = $entry['id'];
             } else {
index c34d942a0775088ae8b776e83ba1629ecf76b411..09c417e8ea6a6026400c212579f6aae9ec17c110 100644 (file)
@@ -21,7 +21,7 @@ if (IS_installed === true && !defined('IN_serendipity')) {
 include_once(S9Y_INCLUDE_PATH . 'include/compat.inc.php');
 
 // The version string
-$serendipity['version']         = '0.9-beta1';
+$serendipity['version']         = '0.9-beta2';
 
 // Name of folder for the default theme
 $serendipity['defaultTemplate'] = 'default';