[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Wed, 13 Jul 2005 20:30:23 -0000


raeburn		Wed Jul 13 16:30:23 2005 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  Will now prompt for embedded .css and .js files in uploaded HTML documents. 
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.644 loncom/lonnet/perl/lonnet.pm:1.645
--- loncom/lonnet/perl/lonnet.pm:1.644	Wed Jun 29 07:57:17 2005
+++ loncom/lonnet/perl/lonnet.pm	Wed Jul 13 16:30:20 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.644 2005/06/29 11:57:17 www Exp $
+# $Id: lonnet.pm,v 1.645 2005/07/13 20:30:20 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1387,6 +1387,18 @@
 	    if (lc($tagname) eq 'img') {
 		&add_filetype($allfiles,$attr->{'src'},'src');
 	    }
+            if (lc($tagname) eq 'script') {
+                if ($attr->{'archive'} =~ /\.jar$/i) {
+                    &add_filetype($allfiles,$attr->{'archive'},'archive');
+                } else {
+                    &add_filetype($allfiles,$attr->{'src'},'src');
+                }
+            }
+            if (lc($tagname) eq 'link') {
+                if (lc($attr->{'rel'}) eq 'stylesheet') { 
+                    &add_filetype($allfiles,$attr->{'href'},'href');
+                }
+            }
 	    if (lc($tagname) eq 'object' ||
 		(lc($tagname) eq 'embed' && lc($state[-2]) ne 'object')) {
 		foreach my $item (keys(%javafiles)) {