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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Tue, 05 Jun 2007 22:36:58 -0000


albertel		Tue Jun  5 18:36:58 2007 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - extend packagest.tab to allow a package to also include the default set of parms
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.882 loncom/lonnet/perl/lonnet.pm:1.883
--- loncom/lonnet/perl/lonnet.pm:1.882	Tue Jun  5 18:35:11 2007
+++ loncom/lonnet/perl/lonnet.pm	Tue Jun  5 18:36:57 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.882 2007/06/05 22:35:11 albertel Exp $
+# $Id: lonnet.pm,v 1.883 2007/06/05 22:36:57 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -6555,13 +6555,18 @@
 	    }
 	}
 	my ($extension) = ($uri =~ /\.(\w+)$/);
+	$extension = lc($extension);
+	if ($extension eq 'htm') { $extension='html'; }
+
 	foreach my $key (keys(%packagetab)) {
 	    #no specific packages #how's our extension
 	    if ($key!~/^extension_\Q$extension\E&/) { next; }
 	    &metadata_create_package_def($uri,$key,'extension_'.$extension,
 					 \%metathesekeys);
 	}
-	if (!exists($metaentry{':packages'})) {
+
+	if (!exists($metaentry{':packages'})
+	    || $packagetab{"import_defaults&extension_$extension"}) {
 	    foreach my $key (keys(%packagetab)) {
 		#no specific packages well let's get default then
 		if ($key!~/^default&/) { next; }