--- loncom/interface/lonsearchcat.pm 2006/03/19 22:08:38 1.258 +++ loncom/interface/lonsearchcat.pm 2006/03/21 21:07:31 1.259 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.258 2006/03/19 22:08:38 albertel Exp $ +# $Id: lonsearchcat.pm,v 1.259 2006/03/21 21:07:31 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -199,7 +199,8 @@ 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); + return &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); } } } else { @@ -220,7 +221,8 @@ 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); + return &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); } } ## @@ -361,14 +363,16 @@ END my $msg = 'Unable to create table in which to store search results. '. 'The search has been aborted.'; - return &error_page($r,$msg); + return &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); } 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); + return &Apache::loncommon::simple_error_page($r,'Search Error', + $msg); } ## ## Print out the frames interface @@ -380,14 +384,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.