--- loncom/interface/lonsearchcat.pm 2002/07/05 18:56:52 1.136 +++ loncom/interface/lonsearchcat.pm 2002/07/08 14:28:10 1.137 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.136 2002/07/05 18:56:52 matthew Exp $ +# $Id: lonsearchcat.pm,v 1.137 2002/07/08 14:28:10 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1247,6 +1247,23 @@ CATALOGCONTROLS chomp $result; next unless $result; %Fields = &parse_raw_result($result,$rkey); + # + # Check copyright tags and skip results the user cannot use + my (undef,undef,$resdom,$resname) = split('/',$Fields{'url'}); + # Check for priv + if (($Fields{'copyright'} eq 'priv') && + (($ENV{'user.name'} ne $resname) && + ($ENV{'user.domain'} ne $resdom))) { +$r->print("
copyright = 'priv' -> Skipping $Fields{'url'}
\n"); + next; + } + # Check for domain + if (($Fields{'copyright'} eq 'domain') && + ($ENV{'user.domain'} ne $resdom)) { +$r->print("
copyright = 'domain' -> Skipping $Fields{'url'}
\n"); + next; + } + # $Fields{'extrashow'}=$extrashow; if ($extrashow) { foreach my $field (@customfields) {