From: Joey Hess Date: Sat, 14 Nov 2009 01:50:27 +0000 (-0500) Subject: inline: Fix display of all pages when archive=yes or show=0 are used. X-Git-Tag: 3.20091113~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d8cfd8d431bd3ec44152944f0b8418bbab6b7920;p=ikiwiki.git inline: Fix display of all pages when archive=yes or show=0 are used. --- diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 8e7fa9958..f89209a1b 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -212,7 +212,7 @@ sub preprocess_inline (@) { if ($params{feedshow} && $num < $params{feedshow}) { $num=$params{feedshow}; } - if ($params{skip}) { + if ($params{skip} && $num) { $num+=$params{skip}; } @@ -221,7 +221,7 @@ sub preprocess_inline (@) { filter => sub { $_[0] eq $params{page} }, sort => exists $params{sort} ? $params{sort} : "age", reverse => yesno($params{reverse}), - num => $num, + ($num ? (num => $num) : ()), ); } diff --git a/debian/changelog b/debian/changelog index b25651f42..c96919252 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,7 @@ ikiwiki (3.20091032) UNRELEASED; urgency=low the cgi/wiki. * inline: Do not generated feeds for nested inlines. * inline: Allow direct inclusion of non-page files in raw mode. + * inline: Fix display of all pages when archive=yes or show=0 are used. -- Joey Hess Fri, 06 Nov 2009 12:04:29 -0500 diff --git a/doc/bugs/inline_skip_causes_empty_inline.mdwn b/doc/bugs/inline_skip_causes_empty_inline.mdwn index 6ee1e601b..e1cbc5470 100644 --- a/doc/bugs/inline_skip_causes_empty_inline.mdwn +++ b/doc/bugs/inline_skip_causes_empty_inline.mdwn @@ -7,4 +7,4 @@ but not in 3.20091031. >> The bug occurs only together with archive="yes" as I Just found out: -[[!inline pages="news/*" archive="yes" feeds="no" skip=3]] +>>> Thanks, [[fixed|done]] in git. --[[Joey]]