]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki.pm
response
[git.ikiwiki.info.git] / IkiWiki.pm
index 0cb3bf143cc65963b2263486d0ce3c7b8677e73f..43ffb1fd8362802dc19f06074437e1f0a4c87f27 100644 (file)
@@ -220,6 +220,13 @@ sub getsetup () {
                safe => 1,
                rebuild => 1,
        },
+       discussionpage => {
+               type => "string",
+               default => gettext("Discussion"),
+               description => "name of Discussion pages",
+               safe => 1,
+               rebuild => 1,
+       },
        sslcookie => {
                type => "boolean",
                default => 0,
@@ -1248,9 +1255,10 @@ sub preprocess ($$$;$$) {
                                        );
                                };
                                if ($@) {
-                                       chomp $@;
+                                       my $error=$@;
+                                       chomp $error;
                                        $ret="[[!$command <span class=\"error\">".
-                                               gettext("Error").": $@"."</span>]]";
+                                               gettext("Error").": $error"."</span>]]";
                                }
                        }
                        else {
@@ -1381,7 +1389,7 @@ sub check_content (@) {
                foreach my $line (split("\n", $params{content})) {
                        push @diff, $line if ! exists $old{$_};
                }
-               $params{content}=join("\n", @diff);
+               $params{diff}=join("\n", @diff);
        }
 
        my $ok;
@@ -2048,7 +2056,7 @@ sub match_created_before ($$;@) {
                }
        }
        else {
-               return IkiWiki::FailReason->new("$testpage has no ctime");
+               return IkiWiki::ErrorReason->new("$testpage does not exist");
        }
 }
 
@@ -2068,7 +2076,7 @@ sub match_created_after ($$;@) {
                }
        }
        else {
-               return IkiWiki::FailReason->new("$testpage has no ctime");
+               return IkiWiki::ErrorReason->new("$testpage does not exist");
        }
 }