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

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 01 Apr 2004 17:36:53 -0000


raeburn		Thu Apr  1 12:36:53 2004 EDT

  Modified files:              
    /loncom/lonnet/perl	lonuploadrep.pm 
  Log:
  No need to do the copy if the session is hosted on the course's home server as $r->filename was already set to point to file in lonUsers/ ... /userfiles/ by lontrans.pm 
  
  
Index: loncom/lonnet/perl/lonuploadrep.pm
diff -u loncom/lonnet/perl/lonuploadrep.pm:1.1 loncom/lonnet/perl/lonuploadrep.pm:1.2
--- loncom/lonnet/perl/lonuploadrep.pm:1.1	Wed Mar 31 11:12:08 2004
+++ loncom/lonnet/perl/lonuploadrep.pm	Thu Apr  1 12:36:53 2004
@@ -34,6 +34,8 @@
 sub handler {
     my $r = shift;
     if ($r->uri =~m|^/*uploaded/(\w+)/(\w+)/(.+)$|) {
+        my $chome=&Apache::lonnet::homeserver($2,$1);
+        if ($chome eq $Apache::lonnet::perlvar{'lonHostID'}) { return OK; }
         my $filename =  $Apache::lonnet::perlvar{'lonDocRoot'}.'/userfiles/'.$1.'/'.$2.'/'.$3;
         my ($info, $rtncode);
         if (-f $filename) {