[LON-CAPA-cvs] cvs: loncom /publisher lonpublisher.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 22 Dec 2003 21:57:25 -0000
albertel Mon Dec 22 16:57:25 2003 EDT
Modified files:
/loncom/publisher lonpublisher.pm
Log:
- BUG#2466 <APPLET CODE="something"> was case sensitive and thus ignoring the CODE
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.147 loncom/publisher/lonpublisher.pm:1.148
--- loncom/publisher/lonpublisher.pm:1.147 Tue Dec 16 09:42:34 2003
+++ loncom/publisher/lonpublisher.pm Mon Dec 22 16:57:25 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.147 2003/12/16 14:42:34 sakharuk Exp $
+# $Id: lonpublisher.pm,v 1.148 2003/12/22 21:57:25 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -693,8 +693,15 @@
}
if ($lctag eq 'applet') {
my $codebase='';
- if (defined($parms{'codebase'})) {
- my $oldcodebase=$parms{'codebase'};
+ my $havecodebase=0;
+ foreach my $key (keys(%parms)) {
+ if (lc($key) eq 'codebase') {
+ $codebase=$parms{$key};
+ $havecodebase=1;
+ }
+ }
+ if ($havecodebase) {
+ my $oldcodebase=$codebase;
unless ($oldcodebase=~/\/$/) {
$oldcodebase.='/';
}
@@ -708,14 +715,13 @@
}
$allow{&absoluteurl($codebase,$target).'/*'}=1;
} else {
- foreach ('archive','code','object') {
- if (defined($parms{$_})) {
- my $oldurl=$parms{$_};
+ foreach my $key (keys(%parms)) {
+ if ($key =~ /(archive|code|object)/i) {
+ my $oldurl=$parms{$key};
my $newurl=&urlfixup($oldurl,$target);
$newurl=~s/\/[^\/]+$/\/\*/;
- print $logfile 'Allow: applet '.$_.':'.
- $oldurl.' allows '.
- $newurl."\n";
+ print $logfile 'Allow: applet '.lc($key).':'.
+ $oldurl.' allows '.$newurl."\n";
$allow{&absoluteurl($newurl,$target)}=1;
}
}