From: Barijaona Ramaholimihaso Date: Mon, 17 Sep 2007 04:17:05 +0000 (+0000) Subject: We make the content_type template pass through the &interpolate routine like other... X-Git-Tag: debian/2.1.2-2~108 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=a17280c0e19336eb0b018535858c4d1149f35e2d;p=pkg%2Fblosxom.git We make the content_type template pass through the &interpolate routine like other templates ; this is a building block to pass the encoding as a parameter. Done early inside the generate routine so that plugins that expect a real content_type will get something sane. --- diff --git a/blosxom.cgi b/blosxom.cgi index 13cf0f9..e5f80ac 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -335,8 +335,6 @@ else { my $content_type = (&$template($path_info,'content_type',$flavour)); $content_type =~ s!\n.*!!s; - $header = {-type=>$content_type}; - print generate('dynamic', $path_info, "$path_info_yr/$path_info_mo_num/$path_info_da", $flavour, $content_type); } @@ -375,6 +373,10 @@ sub generate { # override the default built-in interpolate subroutine my $tmp; foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('interpolate') and defined($tmp = $plugin->interpolate()) and $interpolate = $tmp and last; } + # Content_type + $content_type=&$interpolate($content_type); + $header = {-type=>$content_type}; + # Head my $head = (&$template($currentdir,'head',$flavour));