]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/postsparkline.pm
admin prefs move to setup file, stage 1
[git.ikiwiki.info.git] / IkiWiki / Plugin / postsparkline.pm
index 9e885741e073bc4ded2e3947366ea6265d8249db..6fc96f8b343cbca8eeeb893c41e2569a962d915c 100644 (file)
@@ -29,14 +29,14 @@ sub preprocess (@) { #{{{
        }
 
        if (! exists $params{formula}) {
-               return "[[postsparkline ".gettext("missing formula")."]]";
+               error gettext("missing formula")
        }
        my $formula=$params{formula};
        $formula=~s/[^a-zA-Z0-9]*//g;
        $formula=IkiWiki::possibly_foolish_untaint($formula);
        if (! length $formula ||
            ! IkiWiki::Plugin::postsparkline::formula->can($formula)) {
-               return "[[postsparkline ".gettext("unknown formula")."]]";
+               error gettext("unknown formula");
        }
 
        add_depends($params{page}, $params{pages});
@@ -53,7 +53,7 @@ sub preprocess (@) { #{{{
 
        my @data=eval qq{IkiWiki::Plugin::postsparkline::formula::$formula(\\\%params, \@list)};
        if ($@) {
-               return "[[postsparkline error $@]]";
+               error $@;
        }
 
        if (! @data) {