use warnings;
use strict;
-use IkiWiki;
+use IkiWiki 2.00;
use IPC::Open2;
my $match_num=qr/[-+]?[0-9]+(?:\.[0-9]+)?/;
# the base for its filename.
eval q{use Digest::SHA1};
error($@) if $@;
- my $fn=$params{page}."/sparkline-".
+ my $fn=$params{destpage}."/sparkline-".
IkiWiki::possibly_foolish_untaint(Digest::SHA1::sha1_hex($php)).
".png";
- will_render($params{page}, $fn);
+ will_render($params{destpage}, $fn);
if (! -e "$config{destdir}/$fn") {
my $pid;
}
}
- return '<img src="'.
- IkiWiki::abs2rel($fn, IkiWiki::dirname($params{destpage})).
- '" alt="graph" />';
+ return '<img src="'.urlto($fn, $params{destpage}).'" alt="graph" />';
} # }}}
1