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

raeburn raeburn@source.lon-capa.org
Fri, 03 Jun 2011 00:22:26 -0000


raeburn		Fri Jun  3 00:22:26 2011 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Bug 6474. Modify log spam suppression (added in 1.1097).
    - inhibit request for the metadata file for an uploaded file.   
    Sometimes default metadata are needed, e.g., parmset for a resource, so early
    out is inappropriate.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1107 loncom/lonnet/perl/lonnet.pm:1.1108
--- loncom/lonnet/perl/lonnet.pm:1.1107	Sat May 14 15:47:04 2011
+++ loncom/lonnet/perl/lonnet.pm	Fri Jun  3 00:22:25 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1107 2011/05/14 15:47:04 raeburn Exp $
+# $Id: lonnet.pm,v 1.1108 2011/06/03 00:22:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -8544,7 +8544,7 @@
     if (($uri eq '') || 
 	(($uri =~ m|^/*adm/|) && 
 	     ($uri !~ m|^adm/includes|) && ($uri !~ m|/bulletinboard$|)) ||
-        ($uri =~ m|/$|) || ($uri =~ m|/.meta$|) || ($uri =~ m{^/*uploaded/.+\.sequence$}) || ($uri =~ m{^/*uploaded/$match_domain/$match_courseid/docs/})) {
+        ($uri =~ m|/$|) || ($uri =~ m|/.meta$|) || ($uri =~ m{^/*uploaded/.+\.sequence$})) {
 	return undef;
     }
     if (($uri =~ /^~/ || $uri =~ m{home/$match_username/public_html/}) 
@@ -8590,7 +8590,8 @@
 		&Apache::lonnet::ssi_body($which,
 					  ('grade_target' => 'meta'));
 	    $cachetime = 1; # only want this cached in the child not long term
-	} elsif ($uri !~ m -^(editupload)/-) {
+	} elsif (($uri !~ m -^(editupload)/-) && 
+                 ($uri !~ m{^/*uploaded/$match_domain/$match_courseid/docs/})) {
 	    my $file=&filelocation('',&clutter($filename));
 	    #push(@{$metaentry{$uri.'.file'}},$file);
 	    $metastring=&getfile($file);