From c176dcde982dfa3095cf7c2d05db4cb71c1713e5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 15 Mar 2009 17:39:14 -0400 Subject: [PATCH] Fix bug that caused weird things to appear as page types. The problem was introduced by the recent noextension patches. Object autovivification caused junk to get into %htmlize, and all keys of that showed up as page types. --- IkiWiki.pm | 6 ++++-- debian/changelog | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/IkiWiki.pm b/IkiWiki.pm index a876bbb44..ee07258ec 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -639,8 +639,10 @@ sub pagetype ($) { if ($file =~ /\.([^.]+)$/) { return $1 if exists $hooks{htmlize}{$1}; } - elsif ($hooks{htmlize}{basename($file)}{noextension}) { - return basename($file); + my $base=basename($file); + if (exists $hooks{htmlize}{$base} && + $hooks{htmlize}{$base}{noextension}) { + return $base; } return; } diff --git a/debian/changelog b/debian/changelog index 77b5d9fa6..2c9d1a75a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ ikiwiki (3.08) UNRELEASED; urgency=low * git: Fix utf-8 encoding of author names. * git: Manually decode git output from utf-8, avoids warning messages on invalidly encoded output. + * Fix bug that caused weird things to appear as page types. -- Joey Hess Mon, 09 Mar 2009 14:00:21 -0400 -- 2.45.2