validator/httpd/cgi-bin check,1.611,1.612

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv23372

Modified Files:
	check 
Log Message:
Move template filter subroutine to template defaults.

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.611
retrieving revision 1.612
diff -u -d -r1.611 -r1.612
--- check	3 Jan 2009 21:09:31 -0000	1.611
+++ check	4 Jan 2009 10:23:10 -0000	1.612
@@ -320,6 +320,7 @@
 my %template_defaults = (
   die_on_bad_params => FALSE,
   cache             => TRUE,
+  filter => sub { my $ref = shift; ${$ref} = Encode::decode_utf8(${$ref}); },
 );
 
 $File->{Templates}->{Result} = HTML::Template->new(
@@ -327,22 +328,16 @@
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                            $lang, 'result.tmpl'),
   loop_context_vars => TRUE,
-  filter => sub {
-  my $ref = shift;
-  ${$ref} = Encode::decode_utf8(${$ref});
-  }
 );
 $File->{Templates}->{Error} = HTML::Template->new(
   %template_defaults,
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                            $lang, 'fatal-error.tmpl'),
-  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{AuthzReq} = HTML::Template->new(
   %template_defaults,
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                            $lang, 'http_401_authrequired.tmpl'),
- filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 
 # templates for alternate output formats
@@ -351,35 +346,30 @@
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                           $lang, 'xml_output.tmpl'),
   loop_context_vars => TRUE,
-  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{SOAP} = HTML::Template->new(
   %template_defaults,
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                           $lang, 'soap_output.tmpl'),
   loop_context_vars => TRUE,
-  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{UCN} = HTML::Template->new(
   %template_defaults,
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                           $lang, 'ucn_output.tmpl'),
   loop_context_vars => TRUE,
-  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{SOAPFault} = HTML::Template->new(
   %template_defaults,
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                           $lang, 'soap_fault.tmpl'),
   loop_context_vars => TRUE,
-  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{SOAPDisabled} = HTML::Template->new(
   %template_defaults,
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                           $lang, 'soap_disabled.tmpl'),
   loop_context_vars => TRUE,
-  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{EARLXML} = HTML::Template->new(
   %template_defaults,
@@ -387,7 +377,6 @@
                                           $lang, 'earl_xml.tmpl'),
   loop_context_vars => TRUE,
   global_vars       => TRUE,
-  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{EARLN3} = HTML::Template->new(
   %template_defaults,
@@ -395,7 +384,6 @@
                                           $lang, 'earl_n3.tmpl'),
   loop_context_vars => TRUE,
   global_vars       => TRUE,
-  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{JSON} = HTML::Template->new(
   %template_defaults,
@@ -403,7 +391,6 @@
                                           $lang, 'json_ouput.tmpl'),
   loop_context_vars => TRUE,
   global_vars       => TRUE,
-  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{PrefillHTML} = HTML::Template->new(
   %template_defaults,
@@ -411,7 +398,6 @@
                                           $lang, 'prefill_html401.tmpl'),
   loop_context_vars => TRUE,
   global_vars       => TRUE,
-  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 $File->{Templates}->{PrefillXHTML} = HTML::Template->new(
   %template_defaults,
@@ -419,7 +405,6 @@
                                           $lang, 'prefill_xhtml10.tmpl'),
   loop_context_vars => TRUE,
   global_vars       => TRUE,
-  filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
 );
 
 $File->{Templates}->{Result}->param(cfg_home_page => $CFG->{'Home Page'});

Received on Sunday, 4 January 2009 10:23:20 UTC