version 1.665, 2005/10/18 21:27:46
|
version 1.666, 2005/10/18 21:29:35
|
Line 5787 sub filelocation {
|
Line 5787 sub filelocation {
|
sub hreflocation { |
sub hreflocation { |
my ($dir,$file)=@_; |
my ($dir,$file)=@_; |
unless (($file=~m-^http://-i) || ($file=~m-^/-)) { |
unless (($file=~m-^http://-i) || ($file=~m-^/-)) { |
my $finalpath=filelocation($dir,$file); |
$file=filelocation($dir,$file); |
$finalpath=~s-^/home/httpd/html--; |
} |
$finalpath=~s-^/home/(\w+)/public_html/-/~$1/-; |
if ($file=~m-^\Q$perlvar{'lonDocRoot'}\E-) { |
return $finalpath; |
$file=~s-^\Q$perlvar{'lonDocRoot'}\E--; |
} elsif ($file=~m-^/home-) { |
} elsif ($file=~m-/home/(\w+)/public_html/-) { |
$file=~s-^/home/httpd/html--; |
|
$file=~s-^/home/(\w+)/public_html/-/~$1/-; |
$file=~s-^/home/(\w+)/public_html/-/~$1/-; |
return $file; |
} elsif ($file=~m-^\Q$perlvar{'lonUsersDir'}\E-) { |
|
$file=~s-^/home/httpd/lonUsers/([^/]*)/./././([^/]*)/userfiles/ |
|
-/uploaded/$1/$2/-x; |
} |
} |
return $file; |
return $file; |
} |
} |