--- loncom/interface/lonsearchcat.pm 2002/11/22 18:36:07 1.161 +++ loncom/interface/lonsearchcat.pm 2003/01/06 13:54:25 1.162 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.161 2002/11/22 18:36:07 matthew Exp $ +# $Id: lonsearchcat.pm,v 1.162 2003/01/06 13:54:25 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2250,8 +2250,7 @@ sub display_results { ## foreach my $row (@Results) { if ($connection->aborted()) { - untie %groupsearch_db if (tied(%groupsearch_db)); - &Apache::lonmysql::disconnect_from_db(); + &cleanup(); return; } my %Fields = %{&parse_row(@$row)}; @@ -2963,6 +2962,11 @@ sub start_fresh_session { 1; +sub cleanup { + untie %groupsearch_db if (tied(%groupsearch_db)); + &Apache::lonmysql::disconnect_from_db(); +} + __END__ =pod