validator/httpd/cgi-bin check,1.457,1.458

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

Modified Files:
	check 
Log Message:
merging from 0.7 branch into trunk at tag validator-0_7_2-release
 - Config::General compatibility patches
 - copyright notice update


Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.457
retrieving revision 1.458
diff -u -d -r1.457 -r1.458
--- check	2 Nov 2005 08:12:01 -0000	1.457
+++ check	31 Mar 2006 06:55:03 -0000	1.458
@@ -3,8 +3,13 @@
 # W3C Markup Validation Service
 # A CGI script to retrieve and validate a markup file
 #
-# Copyright 1995-2005 Gerald Oskoboiny <gerald@w3.org>
+# Copyright 1995-2006 World Wide Web Consortium, (Massachusetts                                        
+# Institute of Technology, European Research Consortium for Informatics                                  
+# and Mathematics, Keio University). All Rights Reserved.
+#
+# Originally written by Gerald Oskoboiny <gerald@w3.org>
 # for additional contributors, see http://dev.w3.org/cvsweb/validator/
+# and http://validator.w3.org/about.html#credits
 #
 # This source code is available under the license at:
 #     http://www.w3.org/Consortium/Legal/copyright-software
@@ -182,12 +187,22 @@
   # Use passive FTP by default.
   $ENV{FTP_PASSIVE} = 1 unless exists($ENV{FTP_PASSIVE});
 
-  #
-  # Read friendly error message file
-  my $error_messages_list =  File::Spec->catfile($CFG->{Paths}->{Templates}, 'en_US', 'error_messages.cfg');
-  my %config_opts = (-ConfigFile => $error_messages_list);
-  my %rsrc = Config::General->new(%config_opts)->getall();
-  $RSRC = \%rsrc;
+# Read friendly error message file
+my %rsrc = Config::General->new(
+  -MergeDuplicateBlocks => 1,
+  -ConfigFile           => File::Spec->catfile($CFG->{Paths}->{Templates},
+                                               'en_US', 'error_messages.cfg'),
+  )->getall();
+# 'en_US' should be replaced by $lang for lang-neg
+# Config::General workarounds for <msg 0> issues:
+$rsrc{msg}{0} ||=
+  delete($rsrc{'msg 0'}) ||                   # < 2.31
+  { original => delete($rsrc{msg}{original}), #   2.31
+    verbose  => delete($rsrc{msg}{verbose}),
+  };
+$RSRC = \%rsrc;
+
+
 
 } # end of BEGIN block.
 

Received on Friday, 31 March 2006 08:02:42 UTC