]> sipb.mit.edu Git - ikiwiki.git/commitdiff
tidy up new page_types code
authorJon Dowland <jon@alcopop.org>
Sat, 16 May 2009 13:44:23 +0000 (14:44 +0100)
committerJon Dowland <jon@alcopop.org>
Sat, 16 May 2009 13:44:23 +0000 (14:44 +0100)
IkiWiki/Plugin/editpage.pm

index eb6a7bbcb845bbe2563a7f3e7e0a84f5af0c2a5c..af42097baedc2acb46534e9c818e0124ec0dc82b 100644 (file)
@@ -277,12 +277,7 @@ sub cgi_editpage ($$) {
                        my @page_types;
                        if (exists $hooks{htmlize}) {
                                foreach my $key (grep { !/^_/ } keys %{$hooks{htmlize}}) {
-                                       my $pluginref = ${$hooks{htmlize}}{$key};
-                                       if(${$pluginref}{'longname'}) {
-                                               push @page_types, [$key, ${$pluginref}{'longname'}];
-                                       } else {
-                                               push @page_types, [$key, $key];
-                                       }
+                                       push @page_types, [$key, $hooks{htmlize}{$key}{longname} || $key];
                                }
                        }