]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/sparkline.pm
Merge branch 'master' into next
[ikiwiki.git] / IkiWiki / Plugin / sparkline.pm
index bcff46aeb47ed8156b8d866f348ffab29a7a0f23..dca755c634b161f656581f67f8328189729ffac5 100644 (file)
@@ -14,11 +14,20 @@ my %locmap=(
        left => 'TEXT_LEFT',
 );
 
-sub import { #{{{
+sub import {
+       hook(type => "getsetup", id => "sparkline", call => \&getsetup);
        hook(type => "preprocess", id => "sparkline", call => \&preprocess);
-} # }}}
+}
 
-sub preprocess (@) { #{{{
+sub getsetup () {
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+}
+
+sub preprocess (@) {
        my %params=@_;
 
        my $php;
@@ -157,6 +166,6 @@ sub preprocess (@) { #{{{
        }
 
        return '<img src="'.urlto($fn, $params{destpage}).'" alt="graph" />';
-} # }}}
+}
 
 1