[Jifty-commit] jifty-plugin-comment branch, master, updated. db75bb9d25d4a00ba15528142fc90fad261861ec
Jifty commits
jifty-commit at lists.jifty.org
Fri May 21 15:49:37 EDT 2010
The branch, master has been updated
via db75bb9d25d4a00ba15528142fc90fad261861ec (commit)
via fd4729185d83dd9b315bfa2dc0435ff3bce2ce3d (commit)
from 70629814ab2de4b1d2178f17644e00dd92f2ba19 (commit)
Summary of changes:
.gitignore | 11 +++++++++++
lib/Jifty/Plugin/Comment/Model/Comment.pm | 6 +++---
2 files changed, 14 insertions(+), 3 deletions(-)
create mode 100644 .gitignore
- Log -----------------------------------------------------------------
commit fd4729185d83dd9b315bfa2dc0435ff3bce2ce3d
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri May 21 15:47:40 2010 -0400
Make tests pass when there is not request object
diff --git a/lib/Jifty/Plugin/Comment/Model/Comment.pm b/lib/Jifty/Plugin/Comment/Model/Comment.pm
index 7f3a72e..f68c1d0 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'} = Jifty->web->request->address;
- $args->{'http_user_agent'} = Jifty->web->request->user_agent;
- $args->{'http_referer'} = Jifty->web->request->referer;
+ $args->{'ip_addr'} = Jifty->web->request ? Jifty->web->request->address : '';
+ $args->{'http_user_agent'} = Jifty->web->request ? Jifty->web->request->user_agent : '';
+ $args->{'http_referer'} = Jifty->web->request ? Jifty->web->request->referer : '';
# Prep for Akismet check or stop
my $akismet = $plugin->akismet or return 1;
commit db75bb9d25d4a00ba15528142fc90fad261861ec
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri May 21 15:48:54 2010 -0400
Add a .gitignore
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ebd75c8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+MANIFEST
+MANIFEST.bak
+META.yml
+Makefile
+Makefile.old
+SIGNATURE
+blib/
+inc/
+pm_to_blib
+*.swp
+
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list