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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Tue, 05 Jun 2007 22:35:14 -0000


albertel		Tue Jun  5 18:35:14 2007 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - teach filelocation about /adm urls
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.881 loncom/lonnet/perl/lonnet.pm:1.882
--- loncom/lonnet/perl/lonnet.pm:1.881	Fri May 25 20:38:19 2007
+++ loncom/lonnet/perl/lonnet.pm	Tue Jun  5 18:35:11 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.881 2007/05/26 00:38:19 raeburn Exp $
+# $Id: lonnet.pm,v 1.882 2007/06/05 22:35:11 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7510,6 +7510,7 @@
 	$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:;
@@ -7530,6 +7531,8 @@
   	  $location=$Apache::lonnet::perlvar{'lonDocRoot'}.'/userfiles/'.
   	      $udom.'/'.$uname.'/'.$filename;
         }
+    } elsif ($file =~ m-^/adm/-) {
+	$location = $perlvar{'lonDocRoot'}.'/'.$file;
     } else {
         $file=~s/^\Q$perlvar{'lonDocRoot'}\E//;
         $file=~s:^/res/:/:;