Diff for /loncom/xml/londefdef.pm between versions 1.92 and 1.94

version 1.92, 2002/10/08 20:09:17 version 1.94, 2002/10/08 20:35:19
Line 1552  sub start_table { Line 1552  sub start_table {
     if ($target eq 'web') {      if ($target eq 'web') {
               $currentstring = $token->[4];                     $currentstring = $token->[4];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
       my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);   my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);
    &image_replication($src);
       $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);        $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
               #if original gif/jpg file exist do following:                #if original gif/jpg file exist do following:
               if (-e $src) {                          if (-e $src) {          
Line 1718  sub start_embed { Line 1719  sub start_embed {
             $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=                 $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=   
                                         $token->[2]->{'src'};                                          $token->[2]->{'src'};
     my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);      my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);
     if (not -e '/home/httpd/html'.$src) {      &image_replication($src);
             #replicates image itself  
  &Apache::lonnet::repcopy('/home/httpd/html'.$src);  
         #replicates eps or ps   
  my $newsrc = $src;  
  $newsrc =~ s/(.gif|.jpg)$/.eps/;  
   if (not-e $newsrc && &Apache::lonnet::repcopy('/home/httpd/html'.$newsrc) ne 'OK') {  
     $newsrc =~ s/\.ps$/\.eps/;  
     &Apache::lonnet::repcopy('/home/httpd/html'.$newsrc);  
  }  
     }  
     return '';      return '';
  }   }
         sub end_allow {          sub end_allow {
Line 2527  sub start_embed { Line 2518  sub start_embed {
             }               } 
    return $currentstring;     return $currentstring;
  }   }
   
   sub image_replication {
       my $src = shift;
       if (not -e '/home/httpd/html'.$src) {
    #replicates image itself
    &Apache::lonnet::repcopy('/home/httpd/html'.$src);
    #replicates eps or ps 
    my $newsrc = $src;
    $newsrc =~ s/(.gif|.jpg)$/.eps/;
    if (not-e $newsrc && &Apache::lonnet::repcopy('/home/httpd/html'.$newsrc) ne 'OK') {
       $newsrc =~ s/\.ps$/\.eps/;
       &Apache::lonnet::repcopy('/home/httpd/html'.$newsrc);
    }
       }
       return '';
   }
   
 1;  1;
 __END__  __END__

Removed from v.1.92  
changed lines
  Added in v.1.94


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