summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki')
-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');