tidy up new page_types code
[ikiwiki.git] / 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 @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];
                                }
                        }
                        
                                }
                        }