]> git.mjollnir.org Git - s9y.git/commitdiff
pass email to plugin hook so that gravatar et al can be used
authorgarvinhicking <garvinhicking>
Tue, 28 Jun 2005 08:27:56 +0000 (08:27 +0000)
committergarvinhicking <garvinhicking>
Tue, 28 Jun 2005 08:27:56 +0000 (08:27 +0000)
plugins/serendipity_plugin_comments/serendipity_plugin_comments.php

index e41a0741f6b7cead3d6ca9c9e96fa7d6447c39df..1cc85481f6dd482e2c80d06d1f49fd7499a22789 100644 (file)
@@ -46,7 +46,7 @@ class serendipity_plugin_comments extends serendipity_plugin
         $propbag->add('description',   PLUGIN_COMMENTS_BLAHBLAH);
         $propbag->add('stackable',     true);
         $propbag->add('author',        'Garvin Hicking');
-        $propbag->add('version',       '1.1');
+        $propbag->add('version',       '1.2');
         $propbag->add('requirements',  array(
             'serendipity' => '0.8',
             'smarty'      => '2.6.7',
@@ -138,7 +138,8 @@ class serendipity_plugin_comments extends serendipity_plugin
                         c.id                AS comment_id,
                         c.type              AS comment_type,
                         c.url               AS comment_url,
-                        c.title             AS comment_title
+                        c.title             AS comment_title,
+                        c.email             AS comment_email
                 FROM    '.$serendipity['dbPrefix'].'comments AS c,
                         '.$serendipity['dbPrefix'].'entries  AS e
                WHERE    e.id = c.entry_id
@@ -166,7 +167,8 @@ class serendipity_plugin_comments extends serendipity_plugin
                     $user = htmlspecialchars(strip_tags($row['user']));
                 }
 
-                $entry = array('comment' => wordwrap($comment, $wordwrap, "\n", 1));
+                $entry = array('comment' => wordwrap($comment, $wordwrap, "\n", 1),
+                               'email'   => $row['comment_email']);
                 serendipity_plugin_api::hook_event('frontend_display', $entry);
                 printf(
                   PLUGIN_COMMENTS_ABOUT,