--- loncom/interface/lonsearchcat.pm 2016/08/04 20:59:22 1.349
+++ loncom/interface/lonsearchcat.pm 2020/08/26 00:42:39 1.354
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.349 2016/08/04 20:59:22 raeburn Exp $
+# $Id: lonsearchcat.pm,v 1.354 2020/08/26 00:42:39 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -479,14 +479,31 @@ sub setup_basic_search {
.&mt('use related words')
.'';
+ my $anydom = 1;
+ if ($area eq 'res') {
+ unless (&Apache::lonnet::allowed('bre','/res/') eq 'F') {
+ $anydom = 0;
+ }
+ }
+ my $singledom;
+ my ($disabled,$checked);
+ if ($anydom) {
+ $singledom = $r->dir_config('lonDefDomain');
+ if ($env{'form.domains'} eq $singledom) {
+ $checked = 1;
+ }
+ } else {
+ $singledom = $env{'user.domain'};
+ $disabled = ' disabled="disabled"';
+ $checked = 1;
+ }
$onlysearchdomain = '';
$adv_search_link = '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;
}