version 1.259, 2005/03/01 03:21:58
|
version 1.260, 2005/03/02 22:26:36
|
Line 3749 sub image_replication {
|
Line 3749 sub image_replication {
|
$pssrc =~ s/\.(gif|jpg|jpeg|png)$/.ps/i; |
$pssrc =~ s/\.(gif|jpg|jpeg|png)$/.ps/i; |
if (not -e $epssrc && not -e $pssrc) { |
if (not -e $epssrc && not -e $pssrc) { |
my $result=&Apache::lonnet::repcopy($epssrc); |
my $result=&Apache::lonnet::repcopy($epssrc); |
if ($result ne OK) { &Apache::lonnet::repcopy($pssrc); } |
if ($result ne 'OK') { &Apache::lonnet::repcopy($pssrc); } |
} |
} |
return ''; |
return ''; |
} |
} |
Line 3815 sub get_eps_image {
|
Line 3815 sub get_eps_image {
|
$src=~s/\.(gif|png|jpg|jpeg)$/\.eps/i; |
$src=~s/\.(gif|png|jpg|jpeg)$/\.eps/i; |
$src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); |
$src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); |
if (! -e $src) { |
if (! -e $src) { |
if (&Apache::lonnet::repcopy($src) ne OK ) { |
if (&Apache::lonnet::repcopy($src) ne 'OK' ) { |
#if replication failed try to find ps file |
#if replication failed try to find ps file |
$src=~s/\.eps$/\.ps/; |
$src=~s/\.eps$/\.ps/; |
#if no ps file try to replicate it |
#if no ps file try to replicate it |
if (not -e $src && |
if (not -e $src && |
&Apache::lonnet::repcopy($src) ne OK) { |
&Apache::lonnet::repcopy($src) ne 'OK') { |
#if replication failed try to produce eps file dynamically |
#if replication failed try to produce eps file dynamically |
$src=~s/\.ps$/\.eps/; |
$src=~s/\.ps$/\.eps/; |
my $temp_file; |
my $temp_file; |