]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/template.pm
Update changelog
[git.ikiwiki.info.git] / IkiWiki / Plugin / template.pm
index 52c482c380a706d1f9fd04e4dd74e02b63f26a53..ccc9cb6664e5617c514ba6715107a2c4d1ddc448 100644 (file)
@@ -41,20 +41,18 @@ sub preprocess (@) {
                        blind_cache => 1);
        };
        if ($@) {
                        blind_cache => 1);
        };
        if ($@) {
-               error gettext("failed to process template:")." $@";
-       }
-       if (! $template) {
-               error sprintf(gettext("%s not found"),
+               # gettext can clobber $@
+               my $error = $@;
+               error sprintf(gettext("failed to process template %s"),
                        htmllink($params{page}, $params{destpage},
                        htmllink($params{page}, $params{destpage},
-                               "/templates/$params{id}"))
+                               "/templates/$params{id}"))." $error";
        }
 
        $params{basename}=IkiWiki::basename($params{page});
 
        foreach my $param (keys %params) {
                my $value=IkiWiki::preprocess($params{page}, $params{destpage},
        }
 
        $params{basename}=IkiWiki::basename($params{page});
 
        foreach my $param (keys %params) {
                my $value=IkiWiki::preprocess($params{page}, $params{destpage},
-                         IkiWiki::filter($params{page}, $params{destpagea},
-                         $params{$param}), $scan);
+                         $params{$param}, $scan);
                if ($template->query(name => $param)) {
                        my $htmlvalue=IkiWiki::htmlize($params{page}, $params{destpage},
                                        pagetype($pagesources{$params{page}}),
                if ($template->query(name => $param)) {
                        my $htmlvalue=IkiWiki::htmlize($params{page}, $params{destpage},
                                        pagetype($pagesources{$params{page}}),
@@ -69,8 +67,7 @@ sub preprocess (@) {
        }
 
        return IkiWiki::preprocess($params{page}, $params{destpage},
        }
 
        return IkiWiki::preprocess($params{page}, $params{destpage},
-              IkiWiki::filter($params{page}, $params{destpage},
-              $template->output), $scan);
+              $template->output, $scan);
 }
 
 1
 }
 
 1