[Jifty-commit] r5787 - jifty/trunk/lib/Jifty/Plugin/Comment

Jifty commits jifty-commit at lists.jifty.org
Wed Sep 3 02:55:52 EDT 2008


Author: yves
Date: Wed Sep  3 02:55:51 2008
New Revision: 5787

Modified:
   jifty/trunk/lib/Jifty/Plugin/Comment/View.pm

Log:
* fix i18n mistake on publish/unpublish text
* don't show 'mark as spam' if akismet is not used


Modified: jifty/trunk/lib/Jifty/Plugin/Comment/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Comment/View.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Comment/View.pm	Wed Sep  3 02:55:51 2008
@@ -66,6 +66,8 @@
     my $comment = get 'comment';
     my $top     = get 'top';
 
+    my $plugin = Jifty->find_plugin('Jifty::Plugin::Comment');
+
     div {
         my $class = 'comment';
         $class .= $comment->status eq 'ham' ? ' ham' : ' spam'
@@ -80,7 +82,7 @@
             if (Jifty->web->current_user->id) {
 
                 for my $status (qw( ham spam )) {
-                    if ($comment->status ne $status) {
+                    if ($comment->status ne $status && $plugin->akismet) {
                         hyperlink
                             label => _('mark as %1', $status),
                             onclick => {
@@ -95,7 +97,7 @@
                 for my $published (0, 1) {
                     if ($comment->published ne $published) {
                         hyperlink
-                            label => _($published ? 'publish' : 'unpublish'),
+                            label => $published ? _('publish') : _('unpublish'),
                             onclick => {
                                 args  => {
                                     update_published => $published,


More information about the Jifty-commit mailing list