[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
foxr
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 18 Aug 2008 10:19:59 -0000
foxr Mon Aug 18 06:19:59 2008 EDT
Modified files:
/loncom/xml londefdef.pm
Log:
Properly support files with .bmp extension.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.389 loncom/xml/londefdef.pm:1.390
--- loncom/xml/londefdef.pm:1.389 Tue May 27 21:32:59 2008
+++ loncom/xml/londefdef.pm Mon Aug 18 06:19:59 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.389 2008/05/28 01:32:59 www Exp $
+# $Id: londefdef.pm,v 1.390 2008/08/18 10:19:59 foxr Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -3016,7 +3016,7 @@
# &Apache::lonxml::debug("LaTeX rendering = $latex_rendering image file: $src");
- #if original gif/jpg/png file exist do following:
+ #if original bmp/gif/jpg/png file exist do following:
my $origsrc=$src;
my ($path,$file) = &get_eps_image($src);
# &Apache::lonnet::logthis("Image source: $src result: $path $file");
@@ -4417,8 +4417,8 @@
&Apache::lonnet::repcopy($orig_src); # Failure is not completely fatal.
}
&Apache::lonxml::debug("get_eps_image: Original image: $orig_src");
- my ($spath, $sname, $sext) = &fileparse($src, qr/\.(gif|png|jpg|jpeg)/i);
- $src=~s/\.(gif|png|jpg|jpeg)$/\.eps/i;
+ my ($spath, $sname, $sext) = &fileparse($src, qr/\.(bmp|gif|png|jpg|jpeg)/i);
+ $src=~s/\.(bmp|gif|png|jpg|jpeg)$/\.eps/i;
$src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
&Apache::lonxml::debug("Filelocation gives: $src");
if (! -e $src) {
@@ -4479,7 +4479,7 @@
my $temp_file = Apache::File->new('>>'.$filename);
print $temp_file "$src\n";
my $newsrc = $src;
- $newsrc =~ s/(\.gif|\.jpg|\.jpeg)$/\.eps/i;
+ $newsrc =~ s/(\.bmp|\.gif|\.jpg|\.jpeg)$/\.eps/i;
$newsrc=~s{/home/httpd/html/res}{};
$newsrc=~s{/home/($LONCAPA::username_re)/public_html/}{/$1/};
$newsrc=~s{/\./}{/};