--- loncom/interface/loncommon.pm 2005/04/07 06:56:22 1.258 +++ loncom/interface/loncommon.pm 2005/05/25 21:45:07 1.261 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.258 2005/04/07 06:56:22 albertel Exp $ +# $Id: loncommon.pm,v 1.261 2005/05/25 21:45:07 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -687,6 +687,7 @@ sub help_open_menu { "". "
$text"; } + my $nothing=&Apache::lonhtmlcommon::javascript_nothing(); my $html=&Apache::lonxml::xmlbegin(); my $helpicon=&lonhttpdurl("/adm/lonIcons/helpgateway.gif"); $template .= <<"ENDTEMPLATE"; @@ -698,7 +699,7 @@ function helpMenu(target) { if (target == 'open') { var newWindow = null; try { - newWindow = window.open("/adm/rat/empty.html","helpmenu","HEIGHT=$height,WIDTH=$width,resizable=yes,scrollbars=yes" ) + newWindow = window.open("$nothing","helpmenu","HEIGHT=$height,WIDTH=$width,resizable=yes,scrollbars=yes" ) } catch(error) { writeHelp(caller); @@ -2975,8 +2976,9 @@ sub get_posted_cgi { my $r=shift; my $buffer; - - $r->read($buffer,$r->header_in('Content-length'),0); + if ($r->header_in('Content-length')) { + $r->read($buffer,$r->header_in('Content-length'),0); + } unless ($buffer=~/^(\-+\w+)\s+Content\-Disposition\:\s*form\-data/si) { my @pairs=split(/&/,$buffer); my $pair; @@ -3135,18 +3137,14 @@ sub add_to_env { if (ref($env{$name})) { #already have multiple values push(@{ $env{$name} },$value); - push(@{ $ENV{$name} },$value); } else { #first time seeing multiple values, convert hash entry to an arrayref my $first=$env{$name}; undef($env{$name}); - undef($ENV{$name}); push(@{ $env{$name} },$first,$value); - push(@{ $ENV{$name} },$first,$value); } } else { $env{$name}=$value; - $ENV{$name}=$value; } }