]> git.mjollnir.org Git - s9y.git/commitdiff
Added default user name 'anon'
authorslothman <slothman>
Mon, 16 Jan 2006 21:45:16 +0000 (21:45 +0000)
committerslothman <slothman>
Mon, 16 Jan 2006 21:45:16 +0000 (21:45 +0000)
plugins/serendipity_plugin_comments/serendipity_plugin_comments.php

index 6939b3902b6ece187b6f328e3f57a0b7494c8f0b..ae4f8d529df88422870f8e943e2aa8575876faa1 100644 (file)
@@ -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,
 
-                  '<span class="plugin_comment_author">' . trim($user) . '</span>',
+                  '<span class="plugin_comment_author">' . $user . '</span>',
                   ' <a class="highlight" href="' . serendipity_archiveURL($row['entry_id'], $row['subject'], 'baseURL', true, array('timestamp' => $row['entrystamp'])) .'#c' . $row['comment_id'] . '" title="' . htmlspecialchars($row['subject']) . '">'
                       . htmlspecialchars($row['subject'])
                       . '</a><br />' . "\n"
@@ -212,3 +217,4 @@ class serendipity_plugin_comments extends serendipity_plugin
 }
 
 /* vim: set sts=4 ts=4 expandtab : */
+?>