diff options
author | ville <ville@localhost> | 2003-11-12 21:20:38 +0000 |
---|---|---|
committer | ville <ville@localhost> | 2003-11-12 21:20:38 +0000 |
commit | f507df12f04955374fa0d33a6ad98b2cd21a56b8 (patch) | |
tree | e585ea1a7e92e2e2896da41b0d6d2a62263df150 | |
parent | a72da48ab159d5d0a3f1118cc74d5bdbfd9d872d (diff) | |
download | markup-validator-f507df12f04955374fa0d33a6ad98b2cd21a56b8.zip markup-validator-f507df12f04955374fa0d33a6ad98b2cd21a56b8.tar.gz markup-validator-f507df12f04955374fa0d33a6ad98b2cd21a56b8.tar.bz2 |
Configurable template path, thanks to Struan Donald.
http://lists.w3.org/Archives/Public/www-validator/2003Nov/0059.html
-rw-r--r-- | htdocs/config/validator.conf | 6 | ||||
-rwxr-xr-x | httpd/cgi-bin/check | 11 |
2 files changed, 12 insertions, 5 deletions
diff --git a/htdocs/config/validator.conf b/htdocs/config/validator.conf index 515dc6a..0f530e5 100644 --- a/htdocs/config/validator.conf +++ b/htdocs/config/validator.conf @@ -1,7 +1,7 @@ # # Main Configuration File for the W3C Markup Validation Service. # -# $Id: validator.conf,v 1.8 2003-04-19 04:07:43 link Exp $ +# $Id: validator.conf,v 1.9 2003-11-12 21:20:37 ville Exp $ # # See 'perldoc Config::General' for the syntax, and be aware that the # 'SplitPolicy' is 'equalsign', ie. keys and values are separated by '\s*=\s*'. @@ -34,6 +34,10 @@ SGML_Library = /usr/local/validator/htdocs/sgml-lib #SGML_Parser = /usr/bin/onsgmls # +# Location of template files +#Template_Path = /usr/local/validator/share/templates/en_US + +# # Mapping tables etc... <Element_Map> diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index d8b7c54..8c87943 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -9,7 +9,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.324 2003-05-25 12:07:56 link Exp $ +# $Id: check,v 1.325 2003-11-12 21:20:38 ville Exp $ # # Disable buffering on STDOUT! @@ -105,6 +105,7 @@ BEGIN { -InterPolateVars => TRUE, -DefaultConfig => { Allowed_Protocols => 'http,https', SGML_Parser => '/usr/bin/onsgmls', + Template_Path => '/usr/local/validator/share/templates/en_US', }, ); my %cfg = Config::General->new(%config_opts)->getall(); @@ -146,7 +147,7 @@ The error reported was: '$@' # # Strings - $VERSION = q$Revision: 1.324 $; + $VERSION = q$Revision: 1.325 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; } # end of BEGIN block. @@ -213,11 +214,13 @@ $File->{'Other Namespaces'} = []; # Other (non-root) Namespaces. ############################################################################### my $T = HTML::Template->new( - filename => '/usr/local/validator/share/templates/en_US/result.tmpl', + filename => + File::Spec->catfile($CFG->{Template_Path}, 'result.tmpl'), die_on_bad_params => FALSE, ); my $E = HTML::Template->new( - filename => '/usr/local/validator/share/templates/en_US/fatal-error.tmpl', + filename => + File::Spec->catfile($CFG->{Template_Path}, 'fatal-error.tmpl'), die_on_bad_params => FALSE, ); |