+ my @filtered_results;
+ foreach my $my_tag (@$my_tags) {
+ if (grep { $_->{term} eq $my_tag->{term} } @$results) {
+ if (! $my_tag->{visible} ) {
+ my $check_biblio = GetMarcBiblio({
+ biblionumber => $my_tag->{biblionumber},
+ embed_items => 1,
+ opac => 1,
+ borcat => $borcat });
+ if ($check_biblio) {
+ push @filtered_results, $my_tag;
+ }
+ } else {
+ push @filtered_results, $my_tag;
+ }
+ }
+ }
+ $results = \@filtered_results;