validator/httpd/cgi-bin check,1.418,1.419

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

Modified Files:
	check 
Log Message:

First attempt at fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=1393

Not very elegant yet (can be streamlined, since I am basically adding to 
the case valid what was already used for case invalid) and a bit clumsy due 
to templating not able to test beyond the existence of a variable...




Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.418
retrieving revision 1.419
diff -u -d -r1.418 -r1.419
--- check	10 May 2005 07:13:43 -0000	1.418
+++ check	16 May 2005 08:41:46 -0000	1.419
@@ -855,6 +855,7 @@
   if ($File->{'Is Valid'}) {
     $T->param(VALID => TRUE);
     $T->param(valid_status => 'Valid');
+    $T->param(file_errors => &report_errors($File));
     &report_valid($File, $T);
   } else {
     $T->param(VALID => FALSE);
@@ -1510,6 +1511,17 @@
       if ($err->{type} eq 'I') 
       {
         $err->{class} = 'msg_info';
+        $err->{err_type_info} = 1;
+      }
+      elsif ($err->{type} eq 'E')
+      {
+        $err->{class} = 'msg_err';
+        $err->{err_type_err} = 1;
+      }
+      elsif ($err->{type} eq 'W')
+      {
+        $err->{class} = 'msg_warn';
+        $err->{err_type_warn} = 1;
       }
       # TODO other classes for "W", "E" etc?
 

Received on Monday, 16 May 2005 09:47:32 UTC