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

www www at source.lon-capa.org
Fri Oct 21 12:14:02 EDT 2011


www		Fri Oct 21 16:14:02 2011 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  Bug 1320: no special cases needed
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1138 loncom/lonnet/perl/lonnet.pm:1.1139
--- loncom/lonnet/perl/lonnet.pm:1.1138	Mon Oct 17 17:23:29 2011
+++ loncom/lonnet/perl/lonnet.pm	Fri Oct 21 16:14:02 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1138 2011/10/17 17:23:29 raeburn Exp $
+# $Id: lonnet.pm,v 1.1139 2011/10/21 16:14:02 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -10215,13 +10215,7 @@
 	$file=~s-^/adm/coursedocs/showdoc/-/-;
     }
 
-    if ($file=~m:^/~:) { # is a contruction space reference
-        $location = $file;
-        $location =~ s:/~(.*?)/(.*):/home/$1/public_html/$2:;
-    } elsif ($file=~m{^/home/$match_username/public_html/}) {
-	# is a correct contruction space reference
-        $location = $file;
-    } elsif ($file =~ m-^\Q$Apache::lonnet::perlvar{'lonTabDir'}\E/-) {
+    if ($file =~ m-^\Q$Apache::lonnet::perlvar{'lonTabDir'}\E/-) {
         $location = $file;
     } elsif ($file=~/^\/*(uploaded|editupload)/) { # is an uploaded file
         my ($udom,$uname,$filename)=
@@ -10240,11 +10234,12 @@
 	$location = $perlvar{'lonDocRoot'}.'/'.$file;
     } else {
         $file=~s/^\Q$perlvar{'lonDocRoot'}\E//;
-        $file=~s:^/res/:/:;
+        $file=~s:^/(res|priv)/:/:;
+        my $space=$1;
         if ( !( $file =~ m:^/:) ) {
             $location = $dir. '/'.$file;
         } else {
-            $location = '/home/httpd/html/res'.$file;
+            $location = '/home/httpd/html/'.$space.$file;
         }
     }
     $location=~s://+:/:g; # remove duplicate /
@@ -10269,8 +10264,6 @@
     }
     if ($file=~m-^\Q$perlvar{'lonDocRoot'}\E-) {
 	$file=~s-^\Q$perlvar{'lonDocRoot'}\E--;
-    } elsif ($file=~m-/home/($match_username)/public_html/-) {
-	$file=~s-^/home/($match_username)/public_html/-/~$1/-;
     } elsif ($file=~m-^\Q$perlvar{'lonUsersDir'}\E-) {
 	$file=~s-^/home/httpd/lonUsers/($match_domain)/./././($match_name)/userfiles/
 	    -/uploaded/$1/$2/-x;
@@ -10281,6 +10274,10 @@
     return $file;
 }
 
+
+
+
+
 sub current_machine_domains {
     return &machine_domains(&hostname($perlvar{'lonHostID'}));
 }




More information about the LON-CAPA-cvs mailing list