--- loncom/lonnet/perl/lonnet.pm 2002/05/17 11:39:48 1.222 +++ loncom/lonnet/perl/lonnet.pm 2002/05/18 18:54:29 1.226 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.222 2002/05/17 11:39:48 matthew Exp $ +# $Id: lonnet.pm,v 1.226 2002/05/18 18:54:29 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2763,6 +2763,7 @@ sub hreflocation { unless (($file=~/^http:\/\//i) || ($file=~/^\//)) { my $finalpath=filelocation($dir,$file); $finalpath=~s/^\/home\/httpd\/html//; + $finalpath=~s-/home/(\w+)/public_html/-/~$1/-; return $finalpath; } else { return $file; @@ -2804,12 +2805,12 @@ sub goodbye { } BEGIN { -# ------------------------------------------- Read access.conf and loncapa.conf +# ---------------------------------- Read loncapa_apache.conf and loncapa.conf # (eventually access.conf will become deprecated) unless ($readit) { { - my $config=Apache::File->new("/etc/httpd/conf/access.conf"); + my $config=Apache::File->new("/etc/httpd/conf/loncapa_apache.conf"); while (my $configline=<$config>) { if ($configline =~ /^[^\#]*PerlSetVar/) { @@ -2830,17 +2831,6 @@ BEGIN { } } } -{ - my $config=Apache::File->new("/etc/httpd/conf/loncapa_apache.conf"); - - while (my $configline=<$config>) { - if ($configline =~ /^[^\#]*PerlSetVar/) { - my ($dummy,$varname,$varvalue)=split(/\s+/,$configline); - chomp($varvalue); - $perlvar{$varname}=$varvalue; - } - } -} # ------------------------------------------------------------- Read hosts file { @@ -3303,7 +3293,7 @@ replicates and subscribes to the file =item * filelocation($dir,$file) : returns file system location of a file based on URI; -meant to be "fairly clean" absolute reference +meant to be "fairly clean" absolute reference, $dir is a directory that relative $file lookups are to looked in ($dir of /a/dir and a file of ../bob will become /a/bob) =item *