Diff for /loncom/publisher/loncfile.pm between versions 1.34 and 1.35

version 1.34, 2003/08/01 18:06:33 version 1.35, 2003/08/01 20:32:05
Line 173  Global References Line 173  Global References
 sub URLToPath {  sub URLToPath {
   my $Url = shift;    my $Url = shift;
   &Debug($r, "UrlToPath got: $Url");    &Debug($r, "UrlToPath got: $Url");
   $Url=~ s/^http\:\/\/[^\/]+\/\~(\w+)/\/home\/$1\/public_html/;  
   $Url=~ s/^http\:\/\/[^\/]+//;    $Url=~ s/^http\:\/\/[^\/]+//;
     $Url=~ s/^\///;
     $Url=~ s/(\~|priv\/)(\w+)\//\/home\/$2\/public_html\//;
   &Debug($r, "Returning $Url \n");    &Debug($r, "Returning $Url \n");
   return $Url;    return $Url;
 }  }
Line 1241  sub handler { Line 1242  sub handler {
   
   if ($ENV{'form.filename'}) {    if ($ENV{'form.filename'}) {
       $fn=&Apache::lonnet::unescape($ENV{'form.filename'});        $fn=&Apache::lonnet::unescape($ENV{'form.filename'});
       &Debug($r, "loncfile::handler - raw url: $fn");        $fn=&URLToPath($fn);
 #      $fn=~s/^http\:\/\/[^\/]+\/\~(\w+)/\/home\/$1\/public_html/;  
 #      $fn=~s/^http\:\/\/[^\/]+//;  
       $fn=URLToPath($fn);  
       &Debug($r, "loncfile::handler - doctored url: $fn");  
   
   } else {    } else {
       &Debug($r, "loncfile::handler - no form.filename");        &Debug($r, "loncfile::handler - no form.filename");
      $r->log_reason($ENV{'user.name'}.' at '.$ENV{'user.domain'}.       $r->log_reason($ENV{'user.name'}.' at '.$ENV{'user.domain'}.

Removed from v.1.34  
changed lines
  Added in v.1.35


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>