From 353181c704d1603f2a688270942e2cfdb7053785 Mon Sep 17 00:00:00 2001 From: slothman Date: Mon, 16 Jan 2006 21:45:16 +0000 Subject: [PATCH] Added default user name 'anon' --- .../serendipity_plugin_comments.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php b/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php index 6939b39..ae4f8d5 100644 --- a/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php +++ b/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php @@ -21,8 +21,8 @@ class serendipity_plugin_comments extends serendipity_plugin $propbag->add('name', COMMENTS); $propbag->add('description', PLUGIN_COMMENTS_BLAHBLAH); $propbag->add('stackable', true); - $propbag->add('author', 'Garvin Hicking/Tadashi Jokagi'); - $propbag->add('version', '1.5'); + $propbag->add('author', 'Garvin Hicking/Tadashi Jokagi/Judebert'); + $propbag->add('version', '1.6'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -175,6 +175,11 @@ class serendipity_plugin_comments extends serendipity_plugin $user = htmlspecialchars(strip_tags($row['user'])); } + $user = trim($user); + if (empty($user)) + { + $user = PLUGIN_COMMENTS_ANONYMOUS; + } if ( $serendipity['lang'] == "ja" && function_exists( 'mb_strimwidth')) { $pos = 0; @@ -195,7 +200,7 @@ class serendipity_plugin_comments extends serendipity_plugin printf( PLUGIN_COMMENTS_ABOUT, - '' . trim($user) . '', + '' . $user . '', ' ' . htmlspecialchars($row['subject']) . '
' . "\n" @@ -212,3 +217,4 @@ class serendipity_plugin_comments extends serendipity_plugin } /* vim: set sts=4 ts=4 expandtab : */ +?> -- 2.39.5