[LON-CAPA-cvs] cvs: loncom / lontrans.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 01 Apr 2004 20:18:29 -0000


raeburn		Thu Apr  1 15:18:29 2004 EDT

  Modified files:              
    /loncom	lontrans.pm 
  Log:
  Simpler to get lonHostID from perlvar.
  
  
Index: loncom/lontrans.pm
diff -u loncom/lontrans.pm:1.7 loncom/lontrans.pm:1.8
--- loncom/lontrans.pm:1.7	Wed Mar 31 12:02:51 2004
+++ loncom/lontrans.pm	Thu Apr  1 15:18:29 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # URL translation for User Files
 #
-# $Id: lontrans.pm,v 1.7 2004/03/31 17:02:51 raeburn Exp $
+# $Id: lontrans.pm,v 1.8 2004/04/01 20:18:29 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -33,18 +33,16 @@
 use Apache::lonnet();
 use Apache::File();
 use Apache::loncommon;
-use LONCAPA::Configuration;
 
 sub handler {
     my $r = shift;
-    my $configvars = &LONCAPA::Configuration::read_conf('loncapa.conf');
     if ($r->uri=~m|^(/raw)?/uploaded/|) {
         my $fn = $r->uri();
         $fn=~s/^\/raw//;
         my (undef,undef,$udom,$uname,@ufile)=split(/\//,$fn);
         $ufile[-1]=~s/^[\~\.]+//;
         my $chome=&Apache::lonnet::homeserver($uname,$udom);
-        if ($chome eq $$configvars{'lonHostID'}) {
+        if ($chome eq $Apache::lonnet::perlvar{'lonHostID'}) {
             $r->filename(&Apache::loncommon::propath($udom,$uname).
                      '/userfiles/'.(join('/',@ufile)));
         }