--- loncom/interface/lonsearchcat.pm 2005/12/29 19:45:19 1.250 +++ loncom/interface/lonsearchcat.pm 2006/02/08 16:25:39 1.253 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.250 2005/12/29 19:45:19 www Exp $ +# $Id: lonsearchcat.pm,v 1.253 2006/02/08 16:25:39 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1542,8 +1542,9 @@ sub parse_advanced_search { ## my ($libraries_to_query,$pretty_domains_string,$domain_sql_restriction) = &parse_domain_restrictions(); - push(@queries,$domain_sql_restriction); - $pretty_search_string .= $pretty_domains_string."
\n"; + if ((defined($domain_sql_restriction)) && ($domain_sql_restriction ne '')) { + $pretty_search_string .= $pretty_domains_string."
\n"; + } # if (@queries) { $query="SELECT * FROM metadata WHERE (".join(") AND (",@queries).')'; @@ -1645,9 +1646,6 @@ sub parse_basic_search { return; } push(@Queries,$SQLQuery); - if (defined($domain_sql_restriction) && $domain_sql_restriction ne '') { - push(@Queries,$domain_sql_restriction); - } #foreach my $q (@Queries) { # &Apache::lonnet::logthis(' '.$q); #} @@ -3737,6 +3735,7 @@ sub cleanup { } &untiehash(); &Apache::lonmysql::disconnect_from_db(); + return OK; } __END__