[LON-CAPA-cvs] cvs: loncom /auth lonacc.pm /interface lonmenu.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 07 Feb 2005 23:37:45 -0000


albertel		Mon Feb  7 18:37:45 2005 EDT

  Modified files:              
    /loncom/auth	lonacc.pm 
    /loncom/interface	lonmenu.pm 
  Log:
  - part of BUG#3904, remote navigating a resource not in the course doesn't gie you a return location link
  
  
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.60 loncom/auth/lonacc.pm:1.61
--- loncom/auth/lonacc.pm:1.60	Fri Jan 28 04:30:40 2005
+++ loncom/auth/lonacc.pm	Mon Feb  7 18:37:44 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Cookie Based Access Handler
 #
-# $Id: lonacc.pm,v 1.60 2005/01/28 09:30:40 albertel Exp $
+# $Id: lonacc.pm,v 1.61 2005/02/07 23:37:44 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -145,9 +145,11 @@
                                 "$requrl:bre:1:1:Invalid Access";
   	                return HTTP_NOT_ACCEPTABLE; 
 		    }
-                    my ($map,$mid,$murl)=split(/\_\_\_/,$symb);
-		    &Apache::lonnet::symblist($map,$murl => $mid,
-                                              'last_known' => $murl);
+		    if ($symb) {
+			my ($map,$mid,$murl)=split(/\_\_\_/,$symb);
+			&Apache::lonnet::symblist($map,$murl => $mid,
+						  'last_known' => $murl);
+		    }
                 }
                 $ENV{'request.symb'}=$symb;
                 &Apache::lonnet::courseacclog($symb);
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.143 loncom/interface/lonmenu.pm:1.144
--- loncom/interface/lonmenu.pm:1.143	Wed Feb  2 14:24:45 2005
+++ loncom/interface/lonmenu.pm	Mon Feb  7 18:37:45 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.143 2005/02/02 19:24:45 albertel Exp $
+# $Id: lonmenu.pm,v 1.144 2005/02/07 23:37:45 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -154,9 +154,16 @@
 <td bgcolor="$tabbg">
 <a href="$link"><font color="$font">$lt{'nav'}</font></a></td>
 ENDNAV
-	    if (($ENV{'request.noversionuri'}=~/^\/adm\//) &&
-                ($ENV{'request.noversionuri'}!~/^\/adm\/wrapper\//) &&
-         ($ENV{'request.noversionuri'}!~/^\/adm\/.*\/(smppg|bulletinboard|aboutme)(\?|$)/)) {
+	    if (
+		($ENV{'request.noversionuri'}=~m[^/(res|public)/] &&
+		 $ENV{'request.symb'} ne '')
+		||
+		(($ENV{'request.noversionuri'}=~/^\/adm\//) &&
+		 ($ENV{'request.noversionuri'}!~/^\/adm\/wrapper\//) &&
+		 ($ENV{'request.noversionuri'}!~
+		        m[^/adm/.*/(smppg|bulletinboard|aboutme)($|\?)])
+		  )
+		 ) {
                 my $escreload=&Apache::lonnet::escape('return:');
                 $reloadlink=(<<ENDRELOAD);
 <td bgcolor="$tabbg">