summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2009-01-18 00:38:31 +0100
committerintrigeri <intrigeri@boum.org>2009-01-18 00:38:31 +0100
commite9e75f5f29d78b0631f98d9b0fa93184fcb181fe (patch)
tree32b149ff7fa15747d90b9d20ca0296d4006221cc /IkiWiki/Plugin
parent832d4d31d177d5d5f848250496048a00e9d70e2f (diff)
parentf0c3cc0363ce6da4c3f239decc9fe0e5ed8d624b (diff)
Merge commit 'upstream/master' into prv/po
Conflicts: t/syntax.t
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/blogspam.pm18
-rw-r--r--IkiWiki/Plugin/mercurial.pm2
-rw-r--r--IkiWiki/Plugin/monotone.pm2
3 files changed, 12 insertions, 10 deletions
diff --git a/IkiWiki/Plugin/blogspam.pm b/IkiWiki/Plugin/blogspam.pm
index 6e68a9856..cc6e840f0 100644
--- a/IkiWiki/Plugin/blogspam.pm
+++ b/IkiWiki/Plugin/blogspam.pm
@@ -4,8 +4,6 @@ package IkiWiki::Plugin::blogspam;
use warnings;
use strict;
use IkiWiki 3.00;
-require RPC::XML;
-require RPC::XML::Client;
my $defaulturl='http://test.blogspam.net:8888/';
@@ -47,6 +45,15 @@ sub getsetup () {
sub checkcontent (@) {
my %params=@_;
+
+ eval q{
+ use RPC::XML;
+ use RPC::XML::Client;
+ };
+ if ($@) {
+ warn($@);
+ return undef;
+ }
if (exists $config{blogspam_pagespec}) {
return undef
@@ -76,17 +83,12 @@ sub checkcontent (@) {
# and "buy".
push @options, "exclude=stopwords";
- # blogspam API does not have a field for author url, so put it in
- # the content to be checked.
- if (exists $params{url}) {
- $params{content}.="\n".$params{url};
- }
-
my $res = $client->send_request('testComment', {
ip => $ENV{REMOTE_ADDR},
comment => $params{content},
subject => defined $params{subject} ? $params{subject} : "",
name => defined $params{author} ? $params{author} : "",
+ link => exists $params{url} ? $params{url} : "",
options => join(",", @options),
site => $config{url},
version => "ikiwiki ".$IkiWiki::version,
diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm
index 82423286d..6c4855e57 100644
--- a/IkiWiki/Plugin/mercurial.pm
+++ b/IkiWiki/Plugin/mercurial.pm
@@ -217,7 +217,7 @@ sub rcs_recentchanges ($) {
push @ret, {
rev => $info->{"changeset"},
user => $user,
- committype => "mercurial",
+ committype => "hg",
when => str2time($info->{"date"}),
message => [@message],
pages => [@pages],
diff --git a/IkiWiki/Plugin/monotone.pm b/IkiWiki/Plugin/monotone.pm
index 38abb9a07..bdb564a71 100644
--- a/IkiWiki/Plugin/monotone.pm
+++ b/IkiWiki/Plugin/monotone.pm
@@ -559,7 +559,7 @@ sub rcs_recentchanges ($) {
if ($cert->{key} eq $config{mtnkey}) {
$committype = "web";
} else {
- $committype = "monotone";
+ $committype = "mtn";
}
} elsif ($cert->{name} eq "date") {
$when = str2time($cert->{value}, 'UTC');