]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/editpage.pm
remove redundant use
[git.ikiwiki.info.git] / IkiWiki / Plugin / editpage.pm
index bba52e4fd322e8bbad5f63a13198ff5f491cdef5..480e82804a3beb599df3969d788508dd550bccb6 100644 (file)
@@ -93,7 +93,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;
@@ -105,11 +105,12 @@ sub check_content (@) {
                                $ok=1;
                        }
                        elsif (ref $ret eq 'CODE') {
-                               $ret->();
+                               $ret->() unless $params{nonfatal};
                                $ok=0;
                        }
                        elsif (defined $ret) {
-                               error($ret);
+                               error($ret) unless $params{nonfatal};
+                               $ok=0;
                        }
                }