[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 30 Jan 2004 23:43:06 -0000
albertel Fri Jan 30 18:43:06 2004 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- some day I'll get this stupid logic right.
- BUG#2685
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.467 loncom/lonnet/perl/lonnet.pm:1.468
--- loncom/lonnet/perl/lonnet.pm:1.467 Fri Jan 30 09:42:00 2004
+++ loncom/lonnet/perl/lonnet.pm Fri Jan 30 18:43:04 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.467 2004/01/30 14:42:00 matthew Exp $
+# $Id: lonnet.pm,v 1.468 2004/01/30 23:43:04 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3822,10 +3822,11 @@
my $packages=&metadata($uri,'packages');
foreach my $package (split(/,/,$packages)) {
my ($pack_type,$pack_part)=split(/_/,$package,2);
- if ($pack_part eq $part) {
- if (defined($packagetab{"$pack_type&$name&default"})) {
- return $packagetab{"$pack_type&$name&default"};
- }
+ if (defined($packagetab{"$pack_type&$name&default"})) {
+ return $packagetab{"$pack_type&$name&default"};
+ }
+ if (defined($packagetab{$pack_type."_".$pack_part."&$name&default"})) {
+ return $packagetab{$pack_type."_".$pack_part."&$name&default"};
}
}
return undef;
@@ -3856,7 +3857,7 @@
if (($uri eq '') || (($uri =~ m|^/*adm/|) && ($uri !~ m|^adm/includes|)) ||
($uri =~ m|/$|) || ($uri =~ m|/.meta$|) || ($uri =~ /^~/) ||
($uri =~ m|home/[^/]+/public_html/|)) {
- return '';
+ return undef;
}
my $filename=$uri;
$uri=~s/\.meta$//;