validator/httpd/cgi-bin check,1.432.2.20,1.432.2.21

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

Modified Files:
      Tag: validator-0_7-branch
	check 
Log Message:
More default paths, slightly improved message in case configuration files are missing.
courtesy of Ask Bjørn Hanse
See http://www.w3.org/Bugs/Public/show_bug.cgi?id=3334




Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.432.2.20
retrieving revision 1.432.2.21
diff -u -d -r1.432.2.20 -r1.432.2.21
--- check	9 Nov 2006 01:56:04 -0000	1.432.2.20
+++ check	10 Nov 2006 01:01:28 -0000	1.432.2.21
@@ -107,6 +107,7 @@
     $ENV{W3C_VALIDATOR_HOME} = $1;
   }
 
+  my $base_path = $ENV{W3C_VALIDATOR_HOME} || '/usr/local/validator';
   #
   # Read Config Files.
   eval {
@@ -123,8 +124,10 @@
        -DefaultConfig    => {
           Protocols => {Allow => 'http,https'},
           Paths => {
-            Base => ($ENV{W3C_VALIDATOR_HOME} || '/usr/local/validator'),
-            SGML => {Parser => '/usr/bin/onsgmls'},
+            Base => $base_path,
+            Templates => "$base_path/share/templates",
+            SGML => {Parser => '/usr/bin/onsgmls', 
+                     Library => "$base_path/htdocs/sgml-lib"},
           },
        },
       );
@@ -134,8 +137,9 @@
   if ($@) {
     die <<".EOF.";
 Could not read configuration.  Set the W3C_VALIDATOR_CFG environment variable
-or copy conf/* to /etc/w3c/. Make sure that the configuration file and all
-included files are readable by the web server user. The error was:\n'$@'
+to point to the validator.conf file or copy htdocs/conf/* to /etc/w3c/. Make sure
+that the configuration file and all included files are readable by the web
+server user. The error was:\n'$@'
 .EOF.
   }
 

Received on Friday, 10 November 2006 01:01:42 UTC