]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki.pm
move security to discussion
[git.ikiwiki.info.git] / IkiWiki.pm
index f580d1f0d008fea8aec829914d1bdeca4bf5217f..63da5d0dd0c24cc4f265caae57c6b7c2e6e9fc3b 100644 (file)
@@ -533,7 +533,7 @@ sub loadplugins () {
 
        run_hooks(getopt => sub { shift->() });
        if (grep /^-/, @ARGV) {
-               print STDERR "Unknown option: $_\n"
+               print STDERR "Unknown option (or missing parameter): $_\n"
                        foreach grep /^-/, @ARGV;
                usage();
        }
@@ -639,8 +639,10 @@ sub pagetype ($) {
        if ($file =~ /\.([^.]+)$/) {
                return $1 if exists $hooks{htmlize}{$1};
        }
-       elsif ($hooks{htmlize}{basename($file)}{noextension}) {
-               return basename($file);
+       my $base=basename($file);
+       if (exists $hooks{htmlize}{$base} &&
+           $hooks{htmlize}{$base}{noextension}) {
+               return $base;
        }
        return;
 }
@@ -1337,7 +1339,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;