[LON-CAPA-cvs] cvs: loncom /auth lonacc.pm lonauth.pm loncacc.pm lonlogin.pm /localize lonlocal.pm
www
lon-capa-cvs@mail.lon-capa.org
Sat, 20 Sep 2003 17:44:22 -0000
www Sat Sep 20 13:44:22 2003 EDT
Modified files:
/loncom/auth lonacc.pm lonauth.pm loncacc.pm lonlogin.pm
/loncom/localize lonlocal.pm
Log:
Setting content language in headers.
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.47 loncom/auth/lonacc.pm:1.48
--- loncom/auth/lonacc.pm:1.47 Tue Sep 16 14:15:43 2003
+++ loncom/auth/lonacc.pm Sat Sep 20 13:44:22 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Cookie Based Access Handler
#
-# $Id: lonacc.pm,v 1.47 2003/09/16 18:15:43 www Exp $
+# $Id: lonacc.pm,v 1.48 2003/09/20 17:44:22 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -66,7 +66,7 @@
# --------------------------------------------------------- Initialize Language
- &Apache::lonlocal::get_language_handle();
+ &Apache::lonlocal::get_language_handle($r);
# -------------------------------------------------------------- Resource State
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.56 loncom/auth/lonauth.pm:1.57
--- loncom/auth/lonauth.pm:1.56 Tue Sep 16 15:23:47 2003
+++ loncom/auth/lonauth.pm Sat Sep 20 13:44:22 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# User Authentication Module
#
-# $Id: lonauth.pm,v 1.56 2003/09/16 19:23:47 www Exp $
+# $Id: lonauth.pm,v 1.57 2003/09/20 17:44:22 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -271,7 +271,7 @@
return OK;
}
- &Apache::lonlocal::get_language_handle();
+ &Apache::lonlocal::get_language_handle($r);
my $buffer;
$r->read($buffer,$r->header_in('Content-length'),0);
Index: loncom/auth/loncacc.pm
diff -u loncom/auth/loncacc.pm:1.30 loncom/auth/loncacc.pm:1.31
--- loncom/auth/loncacc.pm:1.30 Tue Sep 16 14:15:43 2003
+++ loncom/auth/loncacc.pm Sat Sep 20 13:44:22 2003
@@ -2,7 +2,7 @@
# Cookie Based Access Handler for Construction Area
# (lonacc: 5/21/99,5/22,5/29,5/31 Gerd Kortemeyer)
#
-# $Id: loncacc.pm,v 1.30 2003/09/16 18:15:43 www Exp $
+# $Id: loncacc.pm,v 1.31 2003/09/20 17:44:22 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -84,7 +84,7 @@
# --------------------------------------------------------- Initialize Language
- &Apache::lonlocal::get_language_handle();
+ &Apache::lonlocal::get_language_handle($r);
# -------------------------------------------------------------- Resource State
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.52 loncom/auth/lonlogin.pm:1.53
--- loncom/auth/lonlogin.pm:1.52 Wed Sep 17 09:47:55 2003
+++ loncom/auth/lonlogin.pm Sat Sep 20 13:44:22 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Login Screen
#
-# $Id: lonlogin.pm,v 1.52 2003/09/17 13:47:55 www Exp $
+# $Id: lonlogin.pm,v 1.53 2003/09/20 17:44:22 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -45,8 +45,9 @@
sub handler {
my $r = shift;
- $r->content_type('text/html');
&Apache::loncommon::no_cache($r);
+ &Apache::lonlocal::get_language_handle($r);
+ $r->content_type('text/html');
$r->send_http_header;
return OK if $r->header_only;
@@ -61,9 +62,6 @@
($ENV{'QUERY_STRING'}.'&'.$ENV{'request.querystring'},
['interface','username','domain','firsturl','localpath','localres']);
-# -------------------------------------------------------------------- Language
-
- &Apache::lonlocal::get_language_handle();
# ----------------------------------------------------------- Process Interface
$ENV{'form.interface'}=~s/\W//g;
Index: loncom/localize/lonlocal.pm
diff -u loncom/localize/lonlocal.pm:1.8 loncom/localize/lonlocal.pm:1.9
--- loncom/localize/lonlocal.pm:1.8 Sat Sep 20 13:04:02 2003
+++ loncom/localize/lonlocal.pm Sat Sep 20 13:44:22 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Localization routines
#
-# $Id: lonlocal.pm,v 1.8 2003/09/20 17:04:02 www Exp $
+# $Id: lonlocal.pm,v 1.9 2003/09/20 17:44:22 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -115,6 +115,7 @@
# ========= Get a handle (do not invoke in vain, leave this to access handlers)
sub get_language_handle {
+ my $r=shift;
$lh=Apache::localize->get_handle(&Apache::loncommon::preferred_languages);
$r->content_languages(["¤t_language()"]);
my $enc=¤t_encoding();