--- loncom/interface/lonsearchcat.pm 2003/03/13 19:08:52 1.171 +++ loncom/interface/lonsearchcat.pm 2003/09/29 16:09:20 1.189 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.171 2003/03/13 19:08:52 matthew Exp $ +# $Id: lonsearchcat.pm,v 1.189 2003/09/29 16:09:20 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -82,6 +82,7 @@ use Text::Query; use GDBM_File; use Apache::loncommon(); use Apache::lonmysql(); +use Apache::lonlocal; # ---------------------------------------- variables used throughout the module @@ -186,7 +187,7 @@ sub handler { # This button is different for the RAT compared to # normal invocation. # - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; return OK if $r->header_only; ## @@ -207,15 +208,14 @@ sub handler { ## this once, so the pause indicator is deleted ## if (exists($ENV{'form.pause'})) { - sleep(3); + sleep(1); delete($ENV{'form.pause'}); } ## ## Initialize global variables ## my $domain = $r->dir_config('lonDefDomain'); - $diropendb= "/home/httpd/perl/tmp/".&Apache::lonnet::escape($domain). - "\_".&Apache::lonnet::escape($ENV{'user.name'})."_searchcat.db"; + $diropendb= "/home/httpd/perl/tmp/$ENV{'user.domain'}_$ENV{'user.name'}_searchcat.db"; # # set the name of the persistent database # $ENV{'form.persistent_db_id'} can only have digits in it. @@ -383,7 +383,8 @@ END (undef,undef,undef,undef); my $pretty_string; if ($ENV{'form.phase'} eq 'basic_search') { - ($query,$pretty_string) = &parse_basic_search($r,$closebutton); + ($query,$pretty_string,$libraries) = + &parse_basic_search($r,$closebutton); } else { # Advanced search ($query,$customquery,$customshow,$libraries,$pretty_string) = &parse_advanced_search($r,$closebutton); @@ -440,7 +441,7 @@ sub course_search { } &untiehash(); unless ($totalfound) { - $r->print('
No resources found.
'); + $r->print(''.&mt('No resources found').'.
'); } # =================================================== Done going through course $r->print('