<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>3334</bug_id>
          
          <creation_ts>2006-06-15 06:20:39 +0000</creation_ts>
          <short_desc>Make a default Templates config</short_desc>
          <delta_ts>2006-11-10 01:03:20 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>check</component>
          <version>0.7.3</version>
          <rep_platform>Macintosh</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.7.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ask Bj">ask</reporter>
          <assigned_to name="Terje Bless">link</assigned_to>
          
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>10039</commentid>
    <comment_count>0</comment_count>
    <who name="Ask Bj">ask</who>
    <bug_when>2006-06-15 06:20:39 +0000</bug_when>
    <thetext>This patch makes a reasonable default for the Templates configuration and makes how to set W3C_VALIDATOR_CFG a little clearer. 

--- /tmp/validator-0.7.2/httpd/cgi-bin/check    2006-02-18 12:06:41.000000000 -0800
+++ validator/cgi-bin/check     2006-06-14 23:13:06.000000000 -0700
@@ -107,6 +107,7 @@
 
   #
   # Read Config Files.
+  my $base = $ENV{W3C_VALIDATOR_HOME} || &apos;/usr/local/validator&apos;;
   eval {
     my %config_opts = (
        -ConfigFile =&gt; ($ENV{W3C_VALIDATOR_CFG} || &apos;/etc/w3c/validator.conf&apos;),
@@ -121,7 +122,8 @@
        -DefaultConfig    =&gt; {
           Protocols =&gt; {Allow =&gt; &apos;http,https&apos;},
           Paths =&gt; {
-            Base =&gt; ($ENV{W3C_VALIDATOR_HOME} || &apos;/usr/local/validator&apos;),
+            Base =&gt; $base,
+            Templates =&gt; &quot;$base/share/templates&quot;,
             SGML =&gt; {Parser =&gt; &apos;/usr/bin/onsgmls&apos;},
           },
        },
@@ -132,8 +134,9 @@
   if ($@) {
     die &lt;&lt;&quot;.EOF.&quot;;
 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&apos;$@&apos;
+to point to the validator.conf file 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&apos;$@&apos;
 .EOF.
   }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12680</commentid>
    <comment_count>1</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2006-10-31 02:59:59 +0000</bug_when>
    <thetext>looks good, will apply and adapt if necessary. Thank you!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12907</commentid>
    <comment_count>2</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2006-11-10 01:03:20 +0000</bug_when>
    <thetext>Done in CVS, will be in the upcoming bugfix release. 
Will also port it to the development version.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>