[LON-CAPA-cvs] cvs: loncom /localize lonlocal.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 08 Oct 2003 17:43:37 -0000
albertel Wed Oct 8 13:43:37 2003 EDT
Modified files:
/loncom/localize lonlocal.pm
Log:
- stop blowing up when $lh ain't there
Index: loncom/localize/lonlocal.pm
diff -u loncom/localize/lonlocal.pm:1.19 loncom/localize/lonlocal.pm:1.20
--- loncom/localize/lonlocal.pm:1.19 Sat Oct 4 16:49:40 2003
+++ loncom/localize/lonlocal.pm Wed Oct 8 13:43:37 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Localization routines
#
-# $Id: lonlocal.pm,v 1.19 2003/10/04 20:49:40 www Exp $
+# $Id: lonlocal.pm,v 1.20 2003/10/08 17:43:37 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -210,8 +210,10 @@
# ============================================================== What language?
sub current_language {
- my $lang=$lh->maketext('language_code');
- return ($lang eq 'language_code'?'en':$lang);
+ if ($lh) {
+ my $lang=$lh->maketext('language_code');
+ return ($lang eq 'language_code'?'en':$lang);
+ }
}
# ============================================================== What encoding?