[LON-CAPA-cvs] cvs: loncom /interface lonerrorhandler.pm resetpw.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Sat, 04 Oct 2008 00:09:18 -0000


raeburn		Fri Oct  3 20:09:18 2008 EDT

  Modified files:              
    /loncom/interface	resetpw.pm lonerrorhandler.pm 
  Log:
  Bug 5604.
  - resetpw.pm : move call to loncommon::start_page() so it occurs after call 
                 to lonlocal::get_language_handle().
  - lonerrorhandler.pm : Need to call lonlocal::get_language_handle() for cases where 
                         errors occur on pages which don't use PerlAuthzHandler lonacc.
  
  
Index: loncom/interface/resetpw.pm
diff -u loncom/interface/resetpw.pm:1.9 loncom/interface/resetpw.pm:1.10
--- loncom/interface/resetpw.pm:1.9	Fri Oct  3 19:37:27 2008
+++ loncom/interface/resetpw.pm	Fri Oct  3 20:09:18 2008
@@ -41,11 +41,6 @@
     if ($r->header_only) {
         return OK;
     }
-    my $start_page =
-        &Apache::loncommon::start_page('Reset password','',
-                                           {
-                                             'no_inline_link'   => 1,});
-    $r->print($start_page);
     my $contact_name = &mt('LON-CAPA helpdesk');
     my $contact_email =  $r->dir_config('lonSupportEMail');
     my $server = $r->dir_config('lonHostID');
@@ -58,6 +53,11 @@
     my $uname = &unescape($env{'form.uname'});
     my $udom = $env{'form.udom'};
     my $token = $env{'form.token'};
+    my $start_page =
+        &Apache::loncommon::start_page('Reset password','',
+                                           {
+                                             'no_inline_link'   => 1,});
+    $r->print($start_page);
     $r->print(&mt('<h3>'.&mt('Reset forgotten LON-CAPA password').'</h3>'));
     my $output;
     if ($token) {
Index: loncom/interface/lonerrorhandler.pm
diff -u loncom/interface/lonerrorhandler.pm:1.15 loncom/interface/lonerrorhandler.pm:1.16
--- loncom/interface/lonerrorhandler.pm:1.15	Tue Aug 19 07:22:00 2008
+++ loncom/interface/lonerrorhandler.pm	Fri Oct  3 20:09:18 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Internal Server Error Handler
 #
-# $Id: lonerrorhandler.pm,v 1.15 2008/08/19 11:22:00 bisitz Exp $
+# $Id: lonerrorhandler.pm,v 1.16 2008/10/04 00:09:18 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -43,7 +43,9 @@
     return OK if $r->header_only;
 
     &Apache::lonacc::get_posted_cgi($r);
-
+    if (!$lh) {
+        &Apache::lonlocal::get_language_handle($r);
+    }
     my $title = $env{'form.sendinfo'} ? 'Sending Error Report'
                                       : 'Could Not Process Request';
     $r->print(&Apache::loncommon::start_page($title));