Diff for /rat/lonratsrv.pm between versions 1.18 and 1.21

version 1.18, 2002/06/24 14:05:51 version 1.21, 2002/08/19 21:15:08
Line 69  sub qtunescape { Line 69  sub qtunescape {
 sub loadmap {  sub loadmap {
     my ($fn,$errtext)=@_;      my ($fn,$errtext)=@_;
     my $outstr='';      my $outstr='';
     my @content=();  
     my @obj=();      my @obj=();
     my @links=();      my @links=();
     if (-e $fn) {      my $instr='';
       if ($fn=~/^\/*uploaded\//) {
           $instr=&Apache::lonnet::getfile($fn);
       } elsif (-e $fn) {
           my @content=();
         {          {
     my $fh=Apache::File->new($fn);      my $fh=Apache::File->new($fn);
             @content=<$fh>;              @content=<$fh>;
         }          }
         my $instr=join('',@content);          $instr=join('',@content);
       }
       if ($instr) {
         my $parser = HTML::TokeParser->new(\$instr);          my $parser = HTML::TokeParser->new(\$instr);
         my $token;          my $token;
         my $graphmode=0;          my $graphmode=0;
Line 286  sub savemap { Line 291  sub savemap {
            }             }
         } @tags;          } @tags;
         $outstr.="</map>\n";          $outstr.="</map>\n";
         {   if ($fn=~/^\/*uploaded\//) {
       $ENV{'form.output'}=$outstr;
               &Apache::lonnet::finishuserfileupload(
                 $ENV{'course.'.$ENV{'request.course.id'}.'.num'},
                 $ENV{'course.'.$ENV{'request.course.id'}.'.domain'},
                 $ENV{'course.'.$ENV{'request.course.id'}.'.home'},
                 'output',(split(/\//,$fn))[-1]);
           } else {
           my $fh;            my $fh;
           if ($fh=Apache::File->new(">$fn")) {            if ($fh=Apache::File->new(">$fn")) {
              print $fh $outstr;               print $fh $outstr;
Line 318  sub handler { Line 330  sub handler {
   $url=~s/\/loadonly\/ratserver$/\/save\/ratserver/;    $url=~s/\/loadonly\/ratserver$/\/save\/ratserver/;
       
   my $fn=$r->filename;    my $fn=$r->filename;
     my $lonDocRoot=$r->dir_config('lonDocRoot');
     if ( $fn =~ /$lonDocRoot/ ) {
         #internal authentication, needs fixup.
         $fn = $url;
         $fn=~s|^/~(\w+)|/home/$1/public_html|;
         $fn=~s|/[^/]*/ratserver$||;
     }
   my $errtext='';    my $errtext='';
   my $outtext='';    my $outtext='';
   

Removed from v.1.18  
changed lines
  Added in v.1.21


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.