--- loncom/interface/lonsearchcat.pm 2002/01/17 13:53:45 1.115 +++ loncom/interface/lonsearchcat.pm 2002/03/07 20:12:36 1.116 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.115 2002/01/17 13:53:45 harris41 Exp $ +# $Id: lonsearchcat.pm,v 1.116 2002/03/07 20:12:36 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -118,16 +118,17 @@ my $domain = ""; sub handler { my $r = shift; untie %hash; - &get_unprocessed_cgi(); $r->content_type('text/html'); $r->send_http_header; return OK if $r->header_only; $domain = $r->dir_config('lonDefDomain'); - $diropendb= "/home/httpd/perl/tmp/$domain\_$ENV{'user.name'}_searchcat.db"; + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, + ['catalogmode','launch','acts']); + if ($ENV{'form.launch'} eq '1') { if (tie(%hash,'GDBM_File',$diropendb,&GDBM_WRCREAT,0640)) { &start_fresh_session(); @@ -305,7 +306,7 @@ $scrout.=' initial users of this syst @@ -355,18 +356,6 @@ ENDDOCUMENT return OK; } -# ----------- grab unprocessed CGI variables that may have been appended to URL -sub get_unprocessed_cgi { - foreach (split(/&/,$ENV{'QUERY_STRING'})) { - my ($name, $value) = split(/=/,$_); - $value =~ tr/+/ /; - $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; - if ($name eq 'catalogmode' or $name eq 'launch' or $name eq 'acts') { - $ENV{'form.'.$name}=$value; - } - } -} - # ------------------------------------------------------------- make persistent sub make_persistent { my $persistent=''; @@ -975,7 +964,7 @@ RESULTS $grid.=$sk; my $hc; if ($rhash{$sk} eq 'con_lost') { - $hc="!!!BAD CONNECTION, CONTACT SYSTEM ADMINISTRATOR!!!"; + $hc="BAD CONNECTION, CONTACT SYSTEM ADMINISTRATOR "; } else { $hc="'+\"'\"+\"+hc['$sk']+\"+\"'\"+'"; @@ -994,7 +983,7 @@ RESULTS } $r->print(< - popwin=open('','popwin','scrollbars=1,width=400,height=200'); + popwin=open('','popwin','scrollbars=1,width=400,height=220'); popwin.focus(); popwin.document.writeln('<'+'html>'); popwin.document.writeln('<'+'head>'); @@ -1022,7 +1011,7 @@ RESULTS $grid '<'+'br />'+ 'Server details '+ - '<'+'input type="text" size="25" name="sdetails"'+ + '<'+'input type="text" size="35" name="sdetails"'+ ' value="" />'+ '<'+'br />'+ ' <'+'input type="button" name="button"'+ @@ -1232,10 +1221,9 @@ END END if ($ENV{'form.catalogmode'} eq 'interactive') { my $titleesc=$title; - $titleesc=~s/\'/\\'/; + $titleesc=~s/\'/\\'/; # ' - $compiledresult.=<