summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/blogspam.pm
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2009-01-19 19:44:39 +0100
committerintrigeri <intrigeri@boum.org>2009-01-19 19:44:39 +0100
commita3726968bc13f19f458c372cbd7cf92ae4c6fce5 (patch)
tree9c0d302b2dd1b452a8849a8a74c414b69e8dccde /IkiWiki/Plugin/blogspam.pm
parent14b49376dc03672f896e5f1df3945a718a39d5a0 (diff)
make checkcontent compatible with hooks that need the full content
Always pass the full (modified) content in `content` named parameter. When the user edits an existing wiki page, also pass a `diff` named parameter, which includes only the lines that they added to the page, or modified. Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'IkiWiki/Plugin/blogspam.pm')
-rw-r--r--IkiWiki/Plugin/blogspam.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/blogspam.pm b/IkiWiki/Plugin/blogspam.pm
index cc6e840f0..d4b5b36d5 100644
--- a/IkiWiki/Plugin/blogspam.pm
+++ b/IkiWiki/Plugin/blogspam.pm
@@ -85,7 +85,7 @@ sub checkcontent (@) {
my $res = $client->send_request('testComment', {
ip => $ENV{REMOTE_ADDR},
- comment => $params{content},
+ comment => defined $params{diff} ? $params{diff} : $params{content},
subject => defined $params{subject} ? $params{subject} : "",
name => defined $params{author} ? $params{author} : "",
link => exists $params{url} ? $params{url} : "",