[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonmainmenu.pm

raeburn raeburn at source.lon-capa.org
Thu May 22 08:47:27 EDT 2014


raeburn		Thu May 22 12:47:27 2014 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonmainmenu.pm 
  Log:
  - For 2.11
    - Backport 1.11
  
  
Index: loncom/interface/lonmainmenu.pm
diff -u loncom/interface/lonmainmenu.pm:1.10.2.1 loncom/interface/lonmainmenu.pm:1.10.2.2
--- loncom/interface/lonmainmenu.pm:1.10.2.1	Wed Apr 17 01:30:15 2013
+++ loncom/interface/lonmainmenu.pm	Thu May 22 12:47:27 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # displays the main menu
 #
-# $Id: lonmainmenu.pm,v 1.10.2.1 2013/04/17 01:30:15 raeburn Exp $
+# $Id: lonmainmenu.pm,v 1.10.2.2 2014/05/22 12:47:27 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -35,13 +35,22 @@
 package Apache::lonmainmenu;
 
 use strict;
-use Apache::Constants qw(:common);
+use Apache::Constants qw(:common REDIRECT);
 use Apache::loncommon();
 use Apache::lonnet;
 use Apache::lonmenu();
 
 sub handler {
     my $r = shift;
+
+    # Check for critical messages and redirect if present.
+    my ($redirect,$url) = &Apache::loncommon::critical_redirect(300);
+    if ($redirect) {
+        &Apache::loncommon::content_type($r,'text/html');
+        $r->header_out(Location => $url);
+        return REDIRECT;
+    }
+
     &Apache::loncommon::no_cache($r);
     &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;




More information about the LON-CAPA-cvs mailing list