--- loncom/interface/lonsearchcat.pm 2006/03/21 21:07:31 1.259 +++ loncom/interface/lonsearchcat.pm 2006/05/12 16:45:41 1.264 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.259 2006/03/21 21:07:31 albertel Exp $ +# $Id: lonsearchcat.pm,v 1.264 2006/05/12 16:45:41 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -199,8 +199,9 @@ sub handler { 'We were unable to retrieve data describing your search. '. 'This is a serious error and has been logged. '. 'Please alert your LON-CAPA administrator.'; - return &Apache::loncommon::simple_error_page($r,'Search Error', - $msg); + &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); + return OK; } } } else { @@ -221,8 +222,9 @@ sub handler { # This is a stupid error to give to the user. # It really tells them nothing. my $msg = 'Unable to tie hash to db file.'; - return &Apache::loncommon::simple_error_page($r,'Search Error', - $msg); + &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); + return OK; } } ## @@ -363,16 +365,18 @@ END my $msg = 'Unable to create table in which to store search results. '. 'The search has been aborted.'; - return &Apache::loncommon::simple_error_page($r,'Search Error', - $msg); + &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); + return OK; } delete($env{'form.launch'}); if (! &make_form_data_persistent($r,$persistent_db_file)) { my $msg= 'Unable to properly store search information. '. 'The search has been aborted.'; - return &Apache::loncommon::simple_error_page($r,'Search Error', - $msg); + &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); + return OK; } ## ## Print out the frames interface @@ -656,9 +660,8 @@ sub print_basic_search_form { my ($r,$closebutton,$hidden_fields) = @_; my $result = ($env{'form.catalogmode'} ne 'groupsearch'); my $bread_crumb = - &Apache::lonhtmlcommon::breadcrumbs(undef,'Searching','Search_Basic', - undef,undef, - $env{'form.catalogmode'} ne 'groupsearch'); + &Apache::lonhtmlcommon::breadcrumbs('Searching','Search_Basic', + $env{'form.catalogmode'} ne 'groupsearch'); my $scrout = &Apache::loncommon::start_page('Search').$bread_crumb; if (&Apache::lonnet::allowed('bre',$env{'request.role.domain'})) { # Define interface components @@ -700,10 +703,8 @@ sub print_basic_search_form { } $scrout.='
'.
- &Apache::lonhtmlcommon::textbox
- ('basicexp',
- &HTML::Entities::encode($env{'form.basicexp'},'<>&"'),50
- ).
+ &Apache::lonhtmlcommon::textbox('basicexp',
+ $env{'form.basicexp'},50).
' '. ''.&searchhelp().''.' | '.
''.
@@ -790,10 +791,8 @@ Prints the advanced search form.
sub print_advanced_search_form{
my ($r,$closebutton,$hidden_fields) = @_;
my $bread_crumb =
- &Apache::lonhtmlcommon::breadcrumbs(undef,'Searching',
- 'Search_Advanced',
- undef,undef,
- $env{'form.catalogmode'} ne 'groupsearch');
+ &Apache::lonhtmlcommon::breadcrumbs('Searching','Search_Advanced',
+ $env{'form.catalogmode'} ne 'groupsearch');
my %lt=&Apache::lonlocal::texthash('srch' => 'Search',
'reset' => 'Reset',
'help' => 'Help');
@@ -2105,9 +2104,8 @@ END
my $start_page = &Apache::loncommon::start_page('Results',$js,
{'only_body' => 1});
my $breadcrumbs=
- &Apache::lonhtmlcommon::breadcrumbs
- (undef,'Searching','Searching',undef,undef,
- $env{'form.catalogmode'} ne 'groupsearch');
+ &Apache::lonhtmlcommon::breadcrumbs('Searching','Searching',
+ $env{'form.catalogmode'} ne 'groupsearch');
my $result = < |