summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorot <ot@localhost>2007-07-25 04:37:36 +0000
committerot <ot@localhost>2007-07-25 04:37:36 +0000
commit8b4785fb72c54eabebe22a707669e3039d8baee0 (patch)
treef6c9356a1ca513dc67a64d9fb1d56858d5ba0c37
parent7fc629f9627dcbc46d54b8c69083beec88d933fa (diff)
downloadmarkup-validator-8b4785fb72c54eabebe22a707669e3039d8baee0.zip
markup-validator-8b4785fb72c54eabebe22a707669e3039d8baee0.tar.gz
markup-validator-8b4785fb72c54eabebe22a707669e3039d8baee0.tar.bz2
workaround for people upgrading without updating their config files => we give a default for the language variable
-rwxr-xr-xhttpd/cgi-bin/check9
1 files changed, 7 insertions, 2 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index ab3e6a9..1117aae 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -14,7 +14,7 @@
# This source code is available under the license at:
# http://www.w3.org/Consortium/Legal/copyright-software
#
-# $Id: check,v 1.545 2007-07-23 06:01:39 ot Exp $
+# $Id: check,v 1.546 2007-07-25 04:37:36 ot Exp $
#
# Disable buffering on STDOUT!
@@ -183,7 +183,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.545 $;
+ $VERSION = q$Revision: 1.546 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -268,6 +268,11 @@ $File->{Namespaces} = []; # Other (non-root) Namespaces.
#### Generate Template for Result. ############################################
###############################################################################
+# in case there is no language set up on the server, we'll use english as default:
+if (!defined $CFG->{Languages}) {
+ $CFG->{Languages} = "en";
+}
+
# first we determine the chosen language based on
# 1) lang argument given as parameter (if this language is available)
# 2) HTTP language negotiation between variants available and user-agent choices