[Jifty-commit] jifty-plugin-comment branch, master, updated. 70629814ab2de4b1d2178f17644e00dd92f2ba19

Jifty commits jifty-commit at lists.jifty.org
Thu May 6 16:10:59 EDT 2010


The branch, master has been updated
       via  70629814ab2de4b1d2178f17644e00dd92f2ba19 (commit)
      from  9f0897b838b033a132ba6339dcaf59f20c32e916 (commit)

Summary of changes:
 Makefile.PL                               |    2 +-
 lib/Jifty/Plugin/Comment/Model/Comment.pm |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 70629814ab2de4b1d2178f17644e00dd92f2ba19
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu May 6 16:08:12 2010 -0400

    Bump to using the Plack interface

diff --git a/Makefile.PL b/Makefile.PL
index bcbf473..5b4ebee 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -2,7 +2,7 @@ use inc::Module::Install;
 name('Jifty-Plugin-Comment');
 all_from('lib/Jifty/Plugin/Comment.pm');
 
-requires('Jifty' => '0.90409');
+requires('Jifty' => '1.00506');
 requires('HTML::Scrubber');
 requires('MIME::Base64::URLSafe');
 requires('Regexp::Common');
diff --git a/lib/Jifty/Plugin/Comment/Model/Comment.pm b/lib/Jifty/Plugin/Comment/Model/Comment.pm
index 40e2556..7f3a72e 100644
--- a/lib/Jifty/Plugin/Comment/Model/Comment.pm
+++ b/lib/Jifty/Plugin/Comment/Model/Comment.pm
@@ -205,9 +205,9 @@ sub before_create {
 
     $args->{'created_on'}      = DateTime->now;
 
-    $args->{'ip_addr'}         = $ENV{'REMOTE_ADDR'};
-    $args->{'http_user_agent'} = $ENV{'HTTP_USER_AGENT'};
-    $args->{'http_referer'}    = $ENV{'HTTP_REFERER'};
+    $args->{'ip_addr'}         = Jifty->web->request->address;
+    $args->{'http_user_agent'} = Jifty->web->request->user_agent;
+    $args->{'http_referer'}    = Jifty->web->request->referer;
 
     # Prep for Akismet check or stop
     my $akismet = $plugin->akismet or return 1;

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list