From 82114f4451fb18a8c0ac44f868df8b0860d432a4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 29 Jan 2013 08:12:56 +1100 Subject: [PATCH] Deal with empty diffurl in configuration. --- IkiWiki/Plugin/recentchanges.pm | 2 +- debian/changelog | 1 + ...nges_sets_has__95__diffurl__61__1_when_diffurl_is_empty.mdwn | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index 4c1863255..eec9803be 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -181,7 +181,7 @@ sub store ($$$) { else { $_->{link} = pagetitle($_->{page}); } - if (defined $_->{diffurl}) { + if (defined $_->{diffurl} && length($_->{diffurl})) { $has_diffurl=1; } diff --git a/debian/changelog b/debian/changelog index d1d132e1e..44bf98112 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ ikiwiki (3.20121213) UNRELEASED; urgency=low a poll. * trail: Avoid massive slowdown caused by pagetemplate hook when displaying dynamic cgi pages, which cannot use trail anyway. + * Deal with empty diffurl in configuration. -- Joey Hess Sat, 22 Dec 2012 16:15:24 -0400 diff --git a/doc/bugs/recentchanges_sets_has__95__diffurl__61__1_when_diffurl_is_empty.mdwn b/doc/bugs/recentchanges_sets_has__95__diffurl__61__1_when_diffurl_is_empty.mdwn index d0297bb3e..6c6e24b02 100644 --- a/doc/bugs/recentchanges_sets_has__95__diffurl__61__1_when_diffurl_is_empty.mdwn +++ b/doc/bugs/recentchanges_sets_has__95__diffurl__61__1_when_diffurl_is_empty.mdwn @@ -14,3 +14,5 @@ recentchanges.pm sets the template variable HAS_DIFFURL to 1 based solely on whe (There should be one more line at the bottom with a single space on it...) + +> [[applied|done]] --[[Joey]] -- 2.32.0.93.g670b81a890