[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Thu Jul 5 15:27:28 EDT 2012


raeburn		Thu Jul  5 19:27:28 2012 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - &symbread() only returns $env{$cache_str} if $thisfn is not null,
    or $env{$cache_str} is not null. 
    (otherwise hierarchy for uploaded documents can be unavailable).
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1178 loncom/lonnet/perl/lonnet.pm:1.1179
--- loncom/lonnet/perl/lonnet.pm:1.1178	Sun Jun 24 17:54:59 2012
+++ loncom/lonnet/perl/lonnet.pm	Thu Jul  5 19:27:27 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1178 2012/06/24 17:54:59 raeburn Exp $
+# $Id: lonnet.pm,v 1.1179 2012/07/05 19:27:27 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -9960,7 +9960,11 @@
 sub symbread {
     my ($thisfn,$donotrecurse)=@_;
     my $cache_str='request.symbread.cached.'.$thisfn;
-    if (defined($env{$cache_str})) { return $env{$cache_str}; }
+    if (defined($env{$cache_str})) {
+        if (($thisfn) || ($env{$cache_str} ne '')) {
+            return $env{$cache_str};
+        }
+    }
 # no filename provided? try from environment
     unless ($thisfn) {
         if ($env{'request.symb'}) {




More information about the LON-CAPA-cvs mailing list