]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
test web revert (fixed bug)
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index 20c5f3bddc08473bd06f27dfa5f5c3e35e1b22c0..c00aed299c8fa2cd27508f2ded85a9f000da7930 100644 (file)
@@ -336,10 +336,7 @@ sub preprocess_inline (@) {
                                        blind_cache => 1);
                        };
                        if ($@) {
-                               error gettext("failed to process template:")." $@";
-                       }
-                       if (! $template) {
-                               error sprintf(gettext("template %s not found"), $params{template}.".tmpl");
+                               error sprintf(gettext("failed to process template %s"), $params{template}.".tmpl").": $@";
                        }
                }
                my $needcontent=$raw || (!($archive && $quick) && $template->query(name => 'content'));
@@ -570,9 +567,9 @@ sub genfeed ($$$$$@) {
                        }
                }
 
-               my $file=$pagesources{$p};
-               my $type=pagetype($file);
                if ($itemtemplate->query(name => "enclosure")) {
+                       my $file=$pagesources{$p};
+                       my $type=pagetype($file);
                        if (defined $type) {
                                $itemtemplate->param(content => $pcontent);
                        }
@@ -591,7 +588,6 @@ sub genfeed ($$$$$@) {
                        }
                }
                else {
-                       next unless defined $type;
                        $itemtemplate->param(content => $pcontent);
                }