]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
attachment: Fix attachment file size display.
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index 20c5f3bddc08473bd06f27dfa5f5c3e35e1b22c0..715a3d6523cfcee4e57c125425d19cfdab110298 100644 (file)
@@ -570,9 +570,9 @@ sub genfeed ($$$$$@) {
                        }
                }
 
                        }
                }
 
-               my $file=$pagesources{$p};
-               my $type=pagetype($file);
                if ($itemtemplate->query(name => "enclosure")) {
                if ($itemtemplate->query(name => "enclosure")) {
+                       my $file=$pagesources{$p};
+                       my $type=pagetype($file);
                        if (defined $type) {
                                $itemtemplate->param(content => $pcontent);
                        }
                        if (defined $type) {
                                $itemtemplate->param(content => $pcontent);
                        }
@@ -591,7 +591,6 @@ sub genfeed ($$$$$@) {
                        }
                }
                else {
                        }
                }
                else {
-                       next unless defined $type;
                        $itemtemplate->param(content => $pcontent);
                }
 
                        $itemtemplate->param(content => $pcontent);
                }