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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 13 Jan 2006 10:36:00 -0000


albertel		Fri Jan 13 05:36:00 2006 EDT

  Modified files:              (Branch: version_2_1_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - backport 1.699 1.700
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.683.2.10 loncom/lonnet/perl/lonnet.pm:1.683.2.11
--- loncom/lonnet/perl/lonnet.pm:1.683.2.10	Wed Jan 11 15:26:45 2006
+++ loncom/lonnet/perl/lonnet.pm	Fri Jan 13 05:35:58 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.683.2.10 2006/01/11 20:26:45 albertel Exp $
+# $Id: lonnet.pm,v 1.683.2.11 2006/01/13 10:35:58 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5166,7 +5166,7 @@
 	$metaentry{':keys'}=join(',',keys %metathesekeys);
 	&metadata_generate_part0(\%metathesekeys,\%metaentry,$uri);
 	$metaentry{':allpossiblekeys'}=join(',',keys %metathesekeys);
-	&do_cache_new('meta',$uri,\%metaentry,60*60*24);
+	&do_cache_new('meta',$uri,\%metaentry,60*60);
 # this is the end of "was not already recently cached
     }
     return $metaentry{':'.$what};
@@ -6005,6 +6005,11 @@
     my ($dir,$file) = @_;
     my $location;
     $file=~ s/^\s*(\S+)\s*$/$1/; ## strip off leading and trailing spaces
+
+    if ($file =~ m-^/adm/-) {
+	$file=~s-^/adm/wrapper/-/-;
+	$file=~s-^/adm/coursedocs/showdoc/-/-;
+    }
     if ($file=~m:^/~:) { # is a contruction space reference
         $location = $file;
         $location =~ s:/~(.*?)/(.*):/home/$1/public_html/$2:;
@@ -6044,6 +6049,9 @@
     my ($dir,$file)=@_;
     unless (($file=~m-^http://-i) || ($file=~m-^/-)) {
 	$file=filelocation($dir,$file);
+    } elsif ($file=~m-^/adm/-) {
+	$file=~s-^/adm/wrapper/-/-;
+	$file=~s-^/adm/coursedocs/showdoc/-/-;
     }
     if ($file=~m-^\Q$perlvar{'lonDocRoot'}\E-) {
 	$file=~s-^\Q$perlvar{'lonDocRoot'}\E--;