- From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 30 Jul 2009 19:29:15 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin In directory hutz:/tmp/cvs-serv9446 Modified Files: check Log Message: Code cleanups. Index: check =================================================================== RCS file: /sources/public/validator/httpd/cgi-bin/check,v retrieving revision 1.676 retrieving revision 1.677 diff -u -d -r1.676 -r1.677 --- check 30 Jul 2009 17:06:38 -0000 1.676 +++ check 30 Jul 2009 19:29:12 -0000 1.677 @@ -540,24 +540,20 @@ $File->{Tentative} |= T_ERROR; # Tag it as Invalid. $File->{Charset}->{Use} = $File->{Charset}->{Override}; } - } else { # charset "hard override" mode + } + else { # charset "hard override" mode if (! $File->{Charset}->{Use}) { # overriding "nothing" - &add_warning('W04', {W04_charset => $File->{Charset}->{Override}, W04_override => TRUE}); + &add_warning('W04', { W04_charset => $File->{Charset}->{Override}, + W04_override => TRUE}); + $File->{Tentative} |= T_ERROR; + $File->{Charset}->{Use} = $File->{Charset}->{Override}; + } + elsif ($File->{Charset}->{Override} ne $File->{Charset}->{Use}) { + # Actually overriding something; warn about override. + &add_warning('W03', { W03_use => $File->{Charset}->{Use}, + W03_opt => $File->{Charset}->{Override}}); $File->{Tentative} |= T_ERROR; $File->{Charset}->{Use} = $File->{Charset}->{Override}; - } - else { #actually overriding something - # Warn about Override unless it's the same as the real charset... - - unless ($File->{Charset}->{Override} eq $File->{Charset}->{Use}) { - &add_warning('W03', { - W03_use => $File->{Charset}->{Use}, - W03_opt => $File->{Charset}->{Override}, - }); - - $File->{Tentative} |= T_ERROR; - $File->{Charset}->{Use} = $File->{Charset}->{Override}; - } } } }
Received on Thursday, 30 July 2009 19:29:23 UTC