W3C home > Mailing lists > Public > www-validator-cvs@w3.org > March 2005

validator/httpd/cgi-bin check,1.409,1.410

From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 25 Mar 2005 03:42:11 +0000
To: www-validator-cvs@w3.org
Message-ID: <E1DEfi7-0001fj-Dz@lionel-hutz.w3.org>

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

Modified Files:
	check 
Log Message:
Moving the declaration of template variable for "file_version" 
(aka human-readable version of the doctype detected or used) from 
valid-only subroutine to a more general location. 
Should fix the absence of info next to "Doctype" in the case of 
an invalid document.





Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.409
retrieving revision 1.410
diff -u -d -r1.409 -r1.410
--- check	24 Mar 2005 09:01:37 -0000	1.409
+++ check	25 Mar 2005 03:42:09 -0000	1.410
@@ -838,6 +838,13 @@
 } else {
   &prep_template($File, $T);
 
+  if (! $File->{Doctype} and ($File->{Version} eq 'unknown' or $File->{Version} eq 'SGML')) {
+      $T->param(file_version => '(no Doctype found)');
+  }
+  else {
+    $T->param(file_version => $File->{Version});
+  }
+  
   if ($File->{'Is Valid'}) {
     $T->param(VALID => TRUE);
     $T->param(valid_status => 'Valid');
@@ -932,7 +939,6 @@
   my $T    = shift;
 
   unless ($File->{Version} eq 'unknown' or defined $File->{Tentative}) {
-    $T->param(file_version => $File->{Version});
 
     if (exists $CFG->{Types}->{$File->{DOCTYPE}}->{Badge}) {
       my $cfg = $CFG->{Types}->{$File->{DOCTYPE}};
Received on Friday, 25 March 2005 03:42:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:54:48 GMT