--- loncom/interface/lonsearchcat.pm 2016/11/09 01:11:04 1.350 +++ loncom/interface/lonsearchcat.pm 2017/08/11 00:32:07 1.353 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.350 2016/11/09 01:11:04 raeburn Exp $ +# $Id: lonsearchcat.pm,v 1.353 2017/08/11 00:32:07 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -687,8 +687,10 @@ function additional_metadata() { $scrout .= &Apache::lonhtmlcommon::row_title(&titlefield(&mt('Domains'))); if ($anydomain) { + my $defdom = &Apache::lonnet::default_login_domain(); + my ($trusted,$untrusted) = &Apache::lonnet::trusted_domains('shared',$defdom); $scrout .= &Apache::loncommon::domain_select('domains', - $env{'form.domains'},1); + $env{'form.domains'},1,$trusted,$untrusted); } else { $scrout .= &Apache::loncommon::select_dom_form($env{'user.domain'}, 'domains','','','',[$env{'user.domain'}],'',1); @@ -2400,8 +2402,6 @@ END %all_library_servers = (%library_servers,%older_library_servers); @Servers_to_contact = sort(keys(%all_library_servers)); foreach my $server (@Servers_to_contact) { - my %possdoms; - map { $possdoms{$_}=1; } &Apache::lonnet::machine_domains($all_library_servers{$server}); $domains_by_server{$server} = join(',',sort(&Apache::lonnet::machine_domains($all_library_servers{$server}))); } @@ -2441,6 +2441,7 @@ END ## Prepare for the big loop. my $hitcountsum; my $oldhitcountsum; + my $displaycount; my %matches; my $server; my $status; @@ -2565,8 +2566,10 @@ END last if ($connection->aborted()); if ($oldhitcountsum < $hitcountsum) { &update_count_status($r,$hitcountsum); - if ($hitcountsum <= $env{'form.show'}) { + if (($hitcountsum <= $env{'form.show'}) || + (!$displaycount && $hitcountsum)) { reload_result_frame($r); + $displaycount = $hitcountsum; } $oldhitcountsum = $hitcountsum; }