[LON-CAPA-cvs] cvs: doc /loncapafiles loncapafiles.lpml loncom loncapa_apache.conf loncom/cgi plot.gif loncom/xml lonplot.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 06 Sep 2006 19:26:34 -0000


albertel		Wed Sep  6 15:26:34 2006 EDT

  Modified files:              
    /loncom/cgi	plot.gif 
    /loncom/xml	lonplot.pm 
    /loncom	loncapa_apache.conf 
    /doc/loncapafiles	loncapafiles.lpml 
  Log:
  - BUG#5000 IE is not likeing the 'send a png as data for a file ending in .gif' so make plot.png a link
  
  
Index: loncom/cgi/plot.gif
diff -u loncom/cgi/plot.gif:1.11 loncom/cgi/plot.gif:1.12
--- loncom/cgi/plot.gif:1.11	Mon Jun 21 16:04:29 2004
+++ loncom/cgi/plot.gif	Wed Sep  6 15:26:07 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 #
-# $Id: plot.gif,v 1.11 2004/06/21 20:04:29 matthew Exp $
+# $Id: plot.gif,v 1.12 2006/09/06 19:26:07 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -37,12 +37,15 @@
 my $filename = $data{'file'};
 # unescape filename
 $filename =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
-
 die if ($filename =~ /\// || $filename !~ /_plot.data$/);
 $filename = $tmpdir . $filename;
 die "$data{'file'} does not exist\n" if (! -e $filename);
 
 my $output = $data{'output'};
+if ($output eq '') {
+    $output = (split('\.',$0))[-1];
+}
+
 if ($output eq 'gif' || $output eq 'png') {
     open PLOT, "gnuplot $filename |";
     print <<"END";
Index: loncom/xml/lonplot.pm
diff -u loncom/xml/lonplot.pm:1.113 loncom/xml/lonplot.pm:1.114
--- loncom/xml/lonplot.pm:1.113	Tue May 30 08:47:53 2006
+++ loncom/xml/lonplot.pm	Wed Sep  6 15:26:15 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Dynamic plot
 #
-# $Id: lonplot.pm,v 1.113 2006/05/30 12:47:53 www Exp $
+# $Id: lonplot.pm,v 1.114 2006/09/06 19:26:15 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -581,7 +581,7 @@
 	## return image tag for the plot
 	if ($target eq 'web') {
 	    $result .= <<"ENDIMAGE";
-<img src    = "/cgi-bin/plot.gif?file=$filename.data&output=$weboutputformat" 
+<img src    = "/cgi-bin/plot.$weboutputformat?file=$filename.data" 
      width  = "$Apache::lonplot::plot{'width'}"
      height = "$Apache::lonplot::plot{'height'}"
      align  = "$Apache::lonplot::plot{'align'}"
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.156 loncom/loncapa_apache.conf:1.157
--- loncom/loncapa_apache.conf:1.156	Thu Aug 31 08:29:32 2006
+++ loncom/loncapa_apache.conf	Wed Sep  6 15:26:26 2006
@@ -1,7 +1,7 @@
 ##
 ## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
 ##
-## $Id: loncapa_apache.conf,v 1.156 2006/08/31 12:29:32 albertel Exp $
+## $Id: loncapa_apache.conf,v 1.157 2006/09/06 19:26:26 albertel Exp $
 ##
 
 #
@@ -1261,7 +1261,7 @@
 
 <Directory /home/httpd/cgi-bin>
 AllowOverride None
-Options ExecCGI
+Options ExecCGI FollowSymLinks
 </Directory>
 
 # ============================================================= Access Handlers
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.500 doc/loncapafiles/loncapafiles.lpml:1.501
--- doc/loncapafiles/loncapafiles.lpml:1.500	Tue Aug 29 17:41:18 2006
+++ doc/loncapafiles/loncapafiles.lpml	Wed Sep  6 15:26:33 2006
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.500 2006/08/29 21:41:18 raeburn Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.501 2006/09/06 19:26:33 albertel Exp $ -->
 
 <!--
 
@@ -1078,6 +1078,12 @@
 Dynamically outputs X-Y plots with point, line, etc functions.
 </description>
 </file>
+<link>
+  <linkto>home/httpd/cgi-bin/plot.gif</linkto>
+  <target dist='default'>home/httpd/cgi-bin/plot.png</target>
+  <categoryname>symbolic link</categoryname>
+  <description>symbolic link for plot.png to point at plot.gif</description>
+</link>
 <file>
 <source>loncom/cgi/imagechoice.pl</source>
 <target dist='default'>home/httpd/cgi-bin/imagechoice.pl</target>