--- loncom/interface/lonsearchcat.pm 2006/03/19 21:54:41 1.257 +++ loncom/interface/lonsearchcat.pm 2006/04/11 19:53:11 1.262 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.257 2006/03/19 21:54:41 albertel Exp $ +# $Id: lonsearchcat.pm,v 1.262 2006/04/11 19:53:11 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -199,7 +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 &error_page($r,$msg); + &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); + return OK; } } } else { @@ -220,7 +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 &error_page($r,$msg); + &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); + return OK; } } ## @@ -361,14 +365,18 @@ END my $msg = 'Unable to create table in which to store search results. '. 'The search has been aborted.'; - return &error_page($r,$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 &error_page($r,$msg); + &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); + return OK; } ## ## Print out the frames interface @@ -380,14 +388,6 @@ END return OK; } -sub error_page { - my ($r,$msg) = @_; - $r->print(&Apache::loncommon::start_page('Search Error'). - &mt($msg). - &Apache::loncommon::end_page()); - return OK; -} - # # The mechanism used to store values away and retrieve them does not # handle the case of missing environment variables being significant. @@ -2106,8 +2106,8 @@ sub print_sort_form { END - my $head = &Apache::loncommon::start_page('Results',$js, - {'only_body' => 1}); + my $start_page = &Apache::loncommon::start_page('Results',$js, + {'only_body' => 1}); my $breadcrumbs= &Apache::lonhtmlcommon::breadcrumbs (undef,'Searching','Searching',undef,undef, @@ -2337,8 +2337,8 @@ sub run_search { # # Print run_search header # - my $head = &Apache::loncommon::start_page('Search Status',undef, - {'only_body' => 1}); + my $start_page = &Apache::loncommon::start_page('Search Status',undef, + {'only_body' => 1}); my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs (undef,'Searching','Searching',undef,undef, $env{'form.catalogmode'} ne 'groupsearch'); @@ -3088,7 +3088,7 @@ SCRIPT my $start_page = &Apache::loncommon::start_page(undef,$js, {'only_body' =>1}); - $result.=< @@ -3125,22 +3125,27 @@ sub print_frames_interface { "&persistent_db_id=".$env{'form.persistent_db_id'}; my $run_search_link = $basic_link."&phase=run_search"; my $results_link = &results_link(); - my $html = &Apache::lonxml::xmlbegin(); - my $head = &Apache::loncommon::headtag('LON-CAPA Digital Library Search Results'); - my $end_head = &Apache::loncommon::endheadtag(); - my $result = <<"ENDFRAMES"; -$html -$head - -$end_head - +JS + + my $start_page = + &Apache::loncommon::start_page('LON-CAPA Digital Library Search Results', + $js, + {'frameset' => 1, + 'add_entries' => { + 'rows' => "150,*",},}); + my $end_page = + &Apache::loncommon::end_page({'frameset' => 1}); + + my $result = <<"ENDFRAMES"; +$start_page - - +$end_page ENDFRAMES $r->print($result);