* postsparkline: Avoid a confusing error message if no pages match

and instead show an empty graph.
master
Joey Hess 2007-10-24 23:07:39 -04:00
parent 239ce68ca0
commit de5eb4996b
2 changed files with 8 additions and 1 deletions

View File

@ -56,6 +56,11 @@ sub preprocess (@) { #{{{
return "[[postsparkline error $@]]"; return "[[postsparkline error $@]]";
} }
if (! @data) {
# generate an empty graph
push @data, 0 foreach 1..$params{max};
}
my $color=exists $params{color} ? "($params{color})" : ""; my $color=exists $params{color} ? "($params{color})" : "";
delete $params{pages}; delete $params{pages};

4
debian/changelog vendored
View File

@ -11,8 +11,10 @@ ikiwiki (2.11) UNRELEASED; urgency=low
* Removed manual ctime statting code, and just have the calendar plugin use * Removed manual ctime statting code, and just have the calendar plugin use
%pagectime. %pagectime.
* Ikiwiki has moved into a git repository. * Ikiwiki has moved into a git repository.
* postsparkline: Avoid a confusing error message if no pages match
and instead show an empty graph.
-- Joey Hess <joeyh@debian.org> Wed, 24 Oct 2007 22:19:31 -0400 -- Joey Hess <joeyh@debian.org> Wed, 24 Oct 2007 22:58:51 -0400
ikiwiki (2.10) unstable; urgency=low ikiwiki (2.10) unstable; urgency=low