]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Fix bug that caused weird things to appear as page types.
authorJoey Hess <joey@gnu.kitenet.net>
Sun, 15 Mar 2009 21:39:14 +0000 (17:39 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Sun, 15 Mar 2009 21:39:14 +0000 (17:39 -0400)
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
debian/changelog

index a876bbb445353ac254d0b872709754289106077e..ee07258ecce01cac5c94ecdf3878cf2a94213778 100644 (file)
@@ -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;
 }
index 77b5d9fa6acc705d51bdc20da215dccd896b4caf..2c9d1a75a9b3f02af3df8e9650b0966923702bdc 100644 (file)
@@ -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 <joeyh@debian.org>  Mon, 09 Mar 2009 14:00:21 -0400